Answer the question
In order to leave comments, you need to log in
Is it possible to prevent the browser from caching all site files?
With the help of meta tags, caching of the HTML document was prohibited, but CSS files and other media rubbish are still cached in browsers of all stripes. Now the site is being finalized, but at the same time it is in the public domain and this often bothers me and not only me. I have to clear browser caches every time. Therefore, such an opportunity is of interest, at least temporarily disable caching with some gadgets on the server side.
Answer the question
In order to leave comments, you need to log in
As I understand it, you have a content versioning problem, that is, new scripts with the same name are not loaded? The correct approach is to add the version tag as a get parameter to scripts until you've completed it to a normal state. Like this:
<link rel="stylesheet" href="https://somecss.com/some.css?v12.3">
Header set Surrogate-Control "no-store"
Header set Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate"
Header set Pragma "no-cache"
Header set Expires "0"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question