0

I want to clear the browser cache (chrome) with a reload button for the users to click it and reload the page. I tried

location.reload(true);

This works fine in Firefox. But not in chrome. I searched for this if its possible. A lot of people write that i need the change meta tags but this do not work for me. I want that the users cache the site and only if they hit the reloaded button it should clear the cache.

I do not use a serviceworker so this

Cache.delete()

could not help me.

If it doesnt work for chrome or other browsers this would help me too. Thanks!

andre.hey
  • 199
  • 1
  • 2
  • 13
  • I am not convinced it is possible, but I'm struggling to find definitive evidence that says either way. – evolutionxbox Jan 25 '22 at 08:59
  • What is the reason you want to do this? There may be other options. – Ouroborus Jan 25 '22 at 09:21
  • Check this answer https://stackoverflow.com/questions/8155064/how-to-programmatically-empty-browser-cache – Grumpy Jan 25 '22 at 09:27
  • @Ouroborus sometimes in the system something looks wrong and the users should easy clear the cache. To tell the users how to clear the cache is to complicated for them – andre.hey Jan 25 '22 at 09:38
  • Usually CTRL+F5 or CTRL+SHIFT+R will force a cacheless reload. – Ouroborus Jan 25 '22 at 09:42
  • @Grumpy with the meta tags i tried but did not work. The other things are for serviceworker and manifest that i do not use so this is no solution for me. The version to change the name of the css and js files work kind of but not the solution i want. The other thinks are more like for permanent no caching. But thanks for your search! – andre.hey Jan 25 '22 at 09:43
  • @Ouroborus yeah but the users are not that easy to handle thats why i want the button – andre.hey Jan 25 '22 at 10:28

0 Answers0