I have a website made with create-react-app. It’s problematic because when I push changes, the client can’t get it as the website is loaded up from a service worker(cached) -> Loads the rest from the disk cache. My terrible code prevents access to the service-worker after loading up the site the first time. Basically, the entire site is loaded from the cache; though there is a single request made to my server. Is there any way that I can use Cloudflare to intercept that request and instruct the client to clear the client’s entire cache?
You cant clear the cache, but you can set appropriate caching headers when you serve the code.
The recommended method to make sure browser cache is effective and users always have the most recent files is via cache busting
This topic was automatically closed after 14 days. New replies are no longer allowed.