Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

http status code 301 - How long does Chrome remember a 301 redirect?

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, How long do browsers cache HTTP 301s? and 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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...