Firefox 5 '缓存' 301 重定向 [英] Firefox 5 'caching' 301 redirects

查看:27
本文介绍了Firefox 5 '缓存' 301 重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么办法可以禁用这个功能"?

Is there any way to disable this 'feature'?

例如,如果向 http://localhost/foo.html 发出请求,我已将其指定为 '301' 到根地址,则所有后续对 foo.html 的请求.html 完全绕过 Web 服务器,ffox 5 将检查它的缓存,读取此 url 之前是301"并重定向,甚至不检查更改.

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.

如果我从 301'ing 中停止了 foo.html,我必须清除 Firefox 的缓存以修复"这种情况发生.

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 和以前版本的 Firefox 不会这样做.

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

推荐答案

301 只是一个普通的可缓存响应代码.http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.2 说:

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.

您也可以手动清除缓存.

这篇关于Firefox 5 '缓存' 301 重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆