Is there a way to expire a file on a user's device which has already been cached using Cache-Control max-age=LARGE_NUMBER
.
I want to force the users to download the latest file but the file has previously been cached for a long duration and users will continue to see the old version for far too long. I now know that I need to set cache-control
to no-store
and I have done this but this doesn't help for the users who have already got the cached version.
I have also set Expires
to 0 but as stated here - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expires, cache-control
takes precedence over expires
so that doesn't solve my problem.
For info, this is occurring on the index.html
file of my react application.
I've seen this - Force browser to clear cache and nothing helps. I've tried adding a query string to the html file but this results in a 404.