How long does Chrome remember a 301 redirect?

Google ChromeHttp Status-Code-301Http RedirectHttp Response-Codes

Google Chrome Problem Overview


I have a new author site that I want to make available from a domain that I had previously used Apache rewriting to bounce traffic to my Amazon site, [R=301,L], which I want to serve up as my own site. I also have a new domain for the interim at least.

Is there (are there) particular durations of times when Chrome in particular will store 301 cached redirects? Some other questions, https://stackoverflow.com/questions/9130422/how-long-do-browsers-cache-http-301s and https://stackoverflow.com/questions/4454787/how-is-301-redirect-implemented-by-different-browsers , ask, and the answer is given that some browsers do not cache, some cache for the session, and Chrome and IE10 cache in a way that will survive a browser restart, but don't specify how long. Longer than the other browsers tested, but the amount is still unspecified.

So how long does Chrome store a 301 redirect? The questions cited do not specify what it is for Chrome or IE10.

Google Chrome Solutions


Solution 1 - Google Chrome

I resolved this by opening dev tools (F12), click "Network", then click the "Preserve log" checkbox, and make the request that results in the cached 301. Right-click the request that results in the 301 and click "clear browser cache". Try again and then 301 should no-longer be cached.

Solution 2 - Google Chrome

Go to chrome://net-internals and at the far right open the drop-down and choose "Clear Cache". As of version 48, this was the only thing that worked for me to clear a cached 301.

Update: Unfortunately, as of version 71 (Dec 2018) Google has removed the net-internals feature.

Solution 3 - Google Chrome

The "view-source:"-solution does not work for me in Google Chrome; but using the developer tools and setting "disable cache" to true/checked in the Network-tab forces a re-evaluation. BTW: temporary circumvention can be achieved in an anonymous-session (Ctrl+Shift+N) or by adding some fake query-argument, like "?foo=bar", to the URL.

Solution 4 - Google Chrome

In either Chrome or Firefox, you can refresh the redirect by typing "view-source:redirect.yoursite.com" and hitting enter. Then, refresh that page. Now, that should force Chrome or Firefox to refresh the redirect.

Solution 5 - Google Chrome

The simplest solution to this is to open up F12 dev tools, check disable cache and then visit the place generating the 301 redirect. This should update to the newer version.

disable cache

Solution 6 - Google Chrome

For example we have cached redirect from http://example.com to https://example.com

  1. Go to Network tools
  2. Check "Preserve log"
  3. Go to http://example.com (it will redirect to https)
  4. Right click on refresh button and click on "Empty cache and Hard Reload"

screenshot

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionChristos HaywardView Question on Stackoverflow
Solution 1 - Google ChromeSam RuebyView Answer on Stackoverflow
Solution 2 - Google ChromeMcGuireV10View Answer on Stackoverflow
Solution 3 - Google ChromeflowtronView Answer on Stackoverflow
Solution 4 - Google ChromemrbofusView Answer on Stackoverflow
Solution 5 - Google ChromeocdiView Answer on Stackoverflow
Solution 6 - Google ChromeijakparovView Answer on Stackoverflow