Many times we clear user browser cache when a user open our website or we need user permission to do so. However I spend some time on the internet to find any article or something about clearing the cache through javaScript but I did not find any.
Asked
Active
Viewed 2,941 times
1
-
There is another thread here: http://stackoverflow.com/questions/11427084/javascript-code-to-clear-the-cache-on-closing-the-browser/11427186#11427186 – Endre Simo Aug 06 '12 at 11:04
1 Answers
1
No - JavaScript would not have permission to perform this sort of OS-level operation. It is clearly something that only the user should be able to invoke, not a third-party script without their knowledge.
If you have issues with caching, there are approaches to force fresh loads, e.g. by adding random query strings to HREFs/SRCs.

Mitya
- 33,629
- 9
- 60
- 107