简体   繁体   English

Chrome在单击href时添加无缓存标题

[英]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.

相关问题 Chrome 正在发送 Cache-control:no-cache 标头 - Chrome is sending Cache-control:no-cache header 即使使用HTTP无缓存标头,Chrome也会进行缓存 - Chrome is caching even with HTTP no-cache headers IE和Chrome缓存“不缓存”图像 - IE and Chrome caches 'no-cache' images 以编程方式添加href时,Chrome锚强调的内容缺失 - Chrome anchor underlining missing when programatically adding href 如果未设置过期和/或无缓存标头,Google Chrome会缓存资源多长时间? - How long does Google Chrome cache a resource if expires and/or no-cache headers are not set? 强制缓存控制:在 F5 重新加载时通过 XMLHttpRequest 在 Chrome 中无缓存 - Force Cache-Control: no-cache in Chrome via XMLHttpRequest on F5 reload Chrome甚至使用Cache-Control来缓存service-worker.js:不存储,不缓存最大年龄:0 - Chrome is caching service-worker.js even with Cache-Control: no-store, no-cache Max-Age: 0 Chrome移动版添加了转发标题 - Chrome mobile adding a Forwarded header 缓存跨域资产时,Chrome应用缓存不会发送“Origin”标头 - Chrome Application Cache doesn't send `Origin` header when caching cross-domain assets 当 PUT 请求包含 If-Match header 时,Chrome 不会使缓存无效 - Chrome does not invalidate cache when PUT request contains If-Match header
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM