I have big problem with chrome's cache.
I'm building system for my clients. All are build on angular so at the begining there is always one index.html file.
With new version I'm changing js scripts tag to ex. scripts.2.1.1.js
in index.html file.
I have also:
<FilesMatch "\.(html)$">
Header set Cache-Control "max-age=1, public"
</FilesMatch>
in my htaccess file.
But chrome seems to ignore it. Every time when I type in url address I have old version, but in source code I have tags to new scripts. When I press F5 it loads new version, but when I close browser's tab and type in url once again I have old version once again?
What's wrong? How to get rid of cache? I don't want a browser solution (clearing cache). I can't force my clients to do that. I want server-side solution. Is there any?
Solution:
<FilesMatch "\.(html|js|css)$">
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</FilesMatch>