问题描述
例如,如果请求 http:// localhost / ,我已经指定为301的根地址,所有后续的请求,以 foo.html
完全绕过web服务器,ffox 5将检查它的缓存,读取这个网址是'301'ed以前和重定向,甚至没有检查改变。
如果我已经停止 foo.html
from 301'ing,我必须清除firefox的缓存才能修复这种情况。
Chrome,IE和以前的Firefox版本不这样做。
解决方案 301只是一个普通的可缓存的响应代码。 说:
除非另有说明,否则此响应是可缓存的。因此,如果你不想缓存,你的服务器需要通过正常的标题使用,否则来控制缓存行为。
您也可以手动清除缓存。
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.
解决方案 301 is just a normal cacheable response code. http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.2 says:
This response is cacheable unless indicated otherwise.
So if you don't want it cached, your server needs to indicate otherwise through the normal headers used to control cache behavior.
You can also clear the cache manually.
这篇关于Firefox 5'缓存'301重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!