ProAnswers.org

Can I use Javascript to disable the browser cache?

1 Like

It is not possible or desirable for Javascript code on a Web page to disable fundamental browser features such as URL resource caching. You should tackle it different way. For example, you can set HTTP headers to request resources are not cached, and that cached resources are refreshed after a specific period, or that the freshness of cached resources is checked before re-loading a page. Web user agents are not obliged to follow these directives, but most will be configured to do so.