Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox 5 'caching' 301 redirects

Tags:

firefox

Is there any way to disable this 'feature'?

For example, if a request is made to http://localhost/foo.html that I have specified to '301' to the root address, all subsequent requests to foo.html bypass the web server completely and ffox 5 will check it's cache, read that this url was '301'ed previously and redirect without even checking for a change.

If i have stopped foo.html from 301'ing, I have to clear firefox's cache in order to 'fix' this from happening.

Chrome, IE and previous version of Firefox do not do this.

like image 877
maxp Avatar asked Aug 08 '11 09:08

maxp


People also ask

Do 301 redirects get cached?

If you redirect from the old domain to the new domain with the 301 redirection, browser caches it too, and prevent's you to enter the old domain.

How do I get rid of browser cache 301 redirect?

Open the Developer Tools Panel by pressing CTRL + Shift + i on Windows or Option + Shift + i on Mac. When you see a developer tools panel open, look the the left of your URL bar to see a refresh icon. Hold the refresh icon for a few seconds until a menu appears. Then click Empty Cache and Hard Reload .

How long is 301 cached?

Reverse proxy responded with a HTTP 301 that will be cached indefinitely by the browser, unless dictated otherwise by the 'Cache-Control' header (30 days in this example response).


1 Answers

In Firefox you have the "Web Developer" Tools (Ctrl+Shift+I). You can click "Network" tab and check the checkbox "Disable Cache" to check for new version of page every time. Then load the original URL and it will refresh your cache. Then you can enable the cache again and access that URL also from other tabs. So you don't need to clear your full cache.


From cptstubing06's comment, the following can help clear the cache:

  1. Type Ctrl+l to put the cursor on the location bar.
  2. Type about:config to open the configuration settings.
  3. Confirm any warnings.
  4. Type browser.cache followed by Enter to filter the settings.
  5. Double-click browser.cache.check_doc_frequency.
  6. Change the value from 3 to 1.
  7. Click OK.
  8. Revisit the obsessively cached 301 page.
  9. Reset the frequency back to 3 when finished.

Firefox should now redirect to the new 301 page, no longer fetching the redirected page from cache.

like image 131
Steve Parish Avatar answered Sep 28 '22 19:09

Steve Parish