Internet Explorer 7 是否通过正确缓存来尊重 Vary 标头?
我使用的技术类似于 Rick Strahls 示例,但有注意到使用谷歌的速度追踪器
资源缓存:@10.88s - 以下资源指定“Vary”标头,该标头在大多数版本的 Internet Explorer 中禁用缓存。修复或删除以下资源的“Vary”标头:...
问题是哪些版本的 Internet Explorer?如果我包括一种仅对除早期版本的 Internet Explorer 之外的所有浏览器输出 Vary 的方法,这个问题会得到解决吗?
If AllowsCacheingOnVaryHeader() Then
Response.AppendHeader("Vary", "Content-Encoding")
Response.AppendHeader("Vary", "Accept-Encoding")
End If
在函数“AllowsCacheingOnVaryHeader()”中 - 我到底应该检查什么? IE 7、8 或 9 之前的所有版本?
I'm using a technique similar to Rick Strahls example, but have notcied using google's speed tracer that
Resource Caching : @10.88s - The following resources specify a "Vary" header that disables caching in most versions of Internet Explorer. Fix or remove the "Vary" header for the following resources: ...
The question is Which versions of internet explorer? If I include a way of only outputting Vary for all browsers except early version of internet explorer, will this get resolved?
If AllowsCacheingOnVaryHeader() Then
Response.AppendHeader("Vary", "Content-Encoding")
Response.AppendHeader("Vary", "Accept-Encoding")
End If
In the function "AllowsCacheingOnVaryHeader()" - what exactly should I be checking for? All version of IE prior to 7, 8 or 9?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅 EricLaw 的 了解这方面的背景。
应该没问题。最新的 IE6 应忽略
Vary: Accept-Encoding
。我相信较旧的 IE6 SP 没有。我不确定那是做什么用的。
Content-Encoding
是一个响应标头,而不是(通常)请求标头,那么如何对其进行Vary
呢?它肯定会让 IE 崩溃,你能简单地删除它并完成它吗?回答这个问题:不,IE7 仍然和 IE6 一样有问题,因为它使用相同的底层 wininet 代码。我没试过,但我希望 IE8 是一样的。当提供 ETag 时,IE7 的表现确实没那么糟糕(它重新验证资源而不是完全重新获取资源),但基本错误没有改变。
See EricLaw's for the background on this.
Should be OK. An up-to-date IE6 should ignore
Vary: Accept-Encoding
. I believe older IE6 SPs didn't.I'm not sure what that's for.
Content-Encoding
is a response header not (typically) a request header so how can youVary
on it? It will certainly trip IE up, can you simply remove that and be done with it?To answer the question: no, IE7 is still just as broken as IE6 re
Vary
, as it's using the same underlying wininet code. I haven't tried it but I expect IE8 is the same. IE7 does behave less badly when an ETag is supplied (it revalidates the resource instead of fully refetching it), but the basic bug is unaltered.