[ACCEPTED]-How to turn off caching on Firefox?-caching
Enter "about:config" into the Firefox address 4 bar and set:
browser.cache.disk.enable = false browser.cache.memory.enable = false
If developing locally, or using 3 HTML5's new manifest attribute you may have 2 to also set the following in about:config 1 -
browser.cache.offline.enable = false
The Web Developer Toolbar has an option to disable caching which 2 makes it very easy to turn it on and off 1 when you need it.
Have you tried to use CTRL-F5 to update the page?
FireBug has an option to disable 2 the browser cache on the Network tab's drop 1 down menu.
Firefox 48 Developer Tools
Allows you to turn off cache only when toolbox 3 is open, which is perfect for web development:
- gearbox on right upper corner
- scroll down top Advanced settings
- check "Disable Cache (when toolbox is open)"
https://stackoverflow.com/a/27397425/895245 has 2 similar content, but positioning changed 1 a bit since.
On the same page you want to disable the 8 caching do this : FYI: the version am working 7 on is 30.0
You can :
After that it will 6 reload page from its own (you are on) and 5 every thing is recached and any furthure 4 request are recahed every time too and you 3 may keep the web developer open always to 2 keep an eye and make sure its always on 1 (check).
If you're working with server side code 5 you could generate a random number and append 4 it to the end of the src in the following 3 manner....
with 2 the randomNumber being randomly generated 1 each time.
I know I'm resurrecting an ancient question, but 21 I was trying to solve this problem today 20 and have an alternate solution. Toggling 19 caching when I want to test was not really 18 acceptable for me, and as others mentioned, hard 17 refreshing (ctrl+shift+r) doesn't always 16 work.
Instead, I opted to put the following 15 in my vhost.conf file (can also be done 14 in .htaccess) on my dev environment:
<FilesMatch "\.(js|css)$"> FileETag None <IfModule mod_headers.c> Header unset ETag Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" Header set Pragma "no-cache" Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT" </IfModule> </FilesMatch>
On my 13 dev environment, this ensures that js and 12 css are always retrieved. Additionally 11 it doesn't affect the rest of my browsing, and 10 it also works for all browsers, so testing 9 in chrome / ie etc is also easy.
Found the 8 snippet here, some other handy apache tricks 7 as well: http://www.askapache.com/htaccess/using-http-headers-with-htaccess.html#prevent-caching-with-htaccess
To make sure that my clients always 6 see the latest version on production, we 5 increment the query string on the js include 4 on each update, ie
This forces my clients' browsers 3 to update their local cache when they see 2 a new querystring, but then caches the new 1 copy until the file is updated again
You can use CTRL-F5 to reload bypassing the cache.
You 5 can set the preferences in firefox not to 4 use the cache
network.http.use-cache = false
You can setup you web server 3 to send a no-cache/Expires/Cache-Control 2 headers for the js files.
Here is an example for 1 apache web server.
Best strategy is to design your site to 7 build a unique URL to your JS files, that 6 gets reset every time there is a change. That 5 way it caches when there has been no change, but 4 imediately reloads when any change occurs.
You'd 3 need to adjust for your specific environment 2 tools, but if you are using PHP/Apache, here's 1 a great solution for both you, and the end-users.
If you use FireBug, on the Network tab's 2 drop down menu there is an option do disable 1 the browser's cache.
I use CTRL-SHIFT-DELETE which activates the privacy feature, allowing 4 you to clear your cache, reset cookies, etc, all 3 at once. You can even configure it so that 2 it just DOES it, instead of popping up a 1 dialog box asking you to confirm.
There are pros and cons to the last two 26 solutions posted, but they're both IMHO 25 great solutions.
You may or may not want 24 your session ID embedded in your url like 23 that for tighter security. But in development 22 that shouldn't matter, but what if you forget 21 to remove it? Also does that really work? Wouldn't 20 you need something like a sequential number 19 generator (hit count stored in the session, or 18 maybe even just if 1 then 0, if 0 then 1)?
Adding 17 a session id (or whatever sequencer) means 16 you need to remember to add it to every 15 resource you don't want cached. On the 14 one hand that's better because you can just 13 include your session id with just that resource 12 you're actively developing and testing. On 11 the other hand, it means you have to do 10 that and you have to remember to remove 9 that for production.
Modifying the vhost.conf 8 or the .htaccess file does the trick nicely 7 without the need to remember to add and 6 remove the session id. But the downside 5 is performance of all js and css resources 4 will be affected, and if you have large 3 files, that's going to slow you down.
Both 2 seem like great, elegant solutions -- depends 1 on your needs.
In higher versions of Firefox, like Nightly, there 6 is an options named "disable cache", you 5 can find it by clicking the gear. And that 4 options works only in current session, which 3 means when you close inspector and restart 2 it, you have to check it again if you want 1 catch disabled.
After 2 hours of browsing for various alternatives, this 9 is something that worked for me.
My requirement 8 was disabling caching of js and css files 7 in my spring secured web application. But 6 at the same time caching these files "within" a 5 particular session.
Passing a unique id with 4 every request is one of the advised approaches.
And 3 this is what I did :- Instead of
Any 2 cons to the above approach are welcome. Security 1 Issues ?
In firefox 45, disk cache options can be 7 set by changing the value of: browser.cache.disk.enable 6
The value can be set on the "about:config" page.
On 5 http://kb.mozillazine.org/About:config_entries#Browser I found the following description for "browser.cache.disk.enable":
True 4 (default): Use disk cache, up to capacity 3 specified in browser.cache.disk.capacity False: Disable 2 disk cache (same effect as setting browser.cache.disk.capacity 1 to 0)
First of All, this can be easily done, for 8 e.g. by PHP to force the browser to renew 7 files based on cache date (expiration time). If 6 you just need it for experimental needs, then 5 try to use ctrl+shift+del to clear all cache 4 at once inside Firefox browser. The third 3 solution is to use many add-ons that exits 2 for Firefox to clear cache based on time 1 lines.
More Related questions