During development I have to \"clear cache\" in Firefox all the time in order to make it use the latest version of JavaScript files.
Is there some kind of setting (a
First of All, this can be easily done, for e.g. by PHP to force the browser to renew files based on cache date (expiration time). If you just need it for experimental needs, then try to use ctrl+shift+del to clear all cache at once inside Firefox browser. The third solution is to use many add-ons that exits for Firefox to clear cache based on time lines.
Have you tried to use CTRL-F5 to update the page?
After 2 hours of browsing for various alternatives, this is something that worked for me.
My requirement was disabling caching of js and css files in my spring secured web application. But at the same time caching these files "within" a particular session.
Passing a unique id with every request is one of the advised approaches.
And this is what I did :- Instead of
<script language="javascript" src="js/home.js"></script>
I used
<script language="javascript" src="js/home.js?id=${pageContext.session.id}"></script>
Any cons to the above approach are welcome. Security Issues ?
If you use FireBug, on the Network tab's drop down menu there is an option do disable the browser's cache.
In firefox 45, disk cache options can be set by changing the value of: browser.cache.disk.enable
The value can be set on the "about:config" page.
On http://kb.mozillazine.org/About:config_entries#Browser I found the following description for "browser.cache.disk.enable":
True (default): Use disk cache, up to capacity specified in browser.cache.disk.capacity False: Disable disk cache (same effect as setting browser.cache.disk.capacity to 0)
You can use CTRL-F5 to reload bypassing the cache.
You can set the preferences in firefox not to use the cache
network.http.use-cache = false
You can setup you web server to send a no-cache/Expires/Cache-Control headers for the js files.
Here is an example for apache web server.