0

I accidentally set a cache for my index file in my application. now I remove this cache policy.

The problem is anyone access to my website got the cached index.html.

How can I refresh the cache? I can't tell all my users across the world to clean the cache..

Any solution to this problem?

Jon Sud
  • 10,211
  • 17
  • 76
  • 174
  • TL;DR: you can't. Wait for the existing caches to expire, and if that won't work because you've set it to cache for a year or something, you need to change the URL (i.e. cache busting). – deceze Jul 30 '20 at 07:40
  • usually in the way you set the cache policy there is a cache invalidate instruction. If not an wasy way is to change the filename (*ie* make the index route go to index1.html) – Greedo Jul 30 '20 at 07:41

1 Answers1

1

Usually it's javascript files which are cached. A pragmatic approach would be to add an argument to you script imports e.g.:

<script type="text/javascript" src="myScript.js?buildNo=123"></script>
Mick
  • 837
  • 8
  • 23