【发布时间】:2012-07-18 20:17:24
【问题描述】:
我目前正在发送以下标头:
Cache-Control: max-age=0
Content-Encoding: gzip
Content-Length: 2929
Content-Type: text/html; charset=utf-8
Date: Thu, 19 Jul 2012 15:29:18 GMT
ETag: "3e34180212ee59fee7e8e4cc512552e5"
然后在后续请求中,我希望所有浏览器都发送带有 ETag 内容的 If-None-Match 标头,以便我可以在必要时以 304 响应。 Firefox、Safari 和 Opera 都会发回 ETag,但 Chrome 和 Internet Explorer 不会。是否存在某些标题组合或缺失值导致 Chrome 和 IE 忽略 ETag?
如果我设置Last-Modified,那么他们都会发送If-Modified-Since,但我需要使用ETags。
【问题讨论】:
-
已修复?我有同样的错误
-
我使用的是 Chrome 62.0.3202.94,也有同样的问题。我已经确保没有在“开发者工具”中选中“禁用缓存”。
标签: internet-explorer caching google-chrome