[英]Chrome adding no-cache header when href is clicked
I have an href in my page like: 我的页面中有一个href,例如:
<a href="/mysection"> My Section </a>
when I click it, Chrome makes the request with a the following header: 当我单击它时,Chrome发出带有以下标头的请求:
Cache-Control:no-cache
which makes the request by-pass all cache layers, so I get a 200 status code for resources that should be cached (so I should receive a 304) 这使得请求绕过了所有缓存层,所以我得到了200个状态代码,用于应缓存的资源(因此我应该收到304)
I've tested the same app with firefox and it doesn't add the Cache-Control header, so I'm getting my 304 status codes as spected. 我已经用firefox测试了同一个应用程序,并且没有添加Cache-Control标头,所以我得到了我指定的304状态代码。
How can I make Chrome not to add no-cache header on href's clicks? 如何使Chrome浏览器不为href的点击添加无缓存标题? is this the default behavior? 这是默认行为吗?
Chrome version: 27.0.1453.110 Chrome版本:27.0.1453.110
Firefox version: 24.0 Firefox版本:24.0
OS: Ubuntu 12.04 LTS 作业系统:Ubuntu 12.04 LTS
I had cache disabled from chrome config. 我从Chrome配置中禁用了缓存。 No that I've enabled it, I'm getting "200 (from cache)" as expected 不,我已启用它,我得到的是“ 200(来自缓存)”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.