问题描述
根据 雅虎关于高性能网站的最佳做法,我想删除我的标头中的 Etags(我手动管理我的所有缓存并且不需要 Etags ......当/如果我需要扩展到农场,我真的希望它们消失).我在 Windows Server 2008 上运行 IIS7.有人知道我该怎么做吗?
Per Yahoo's best practices for high performance web sites, I'd like to remove Etags from my headers (I'm manually managing all my caching and have no need for Etags... and when/if I need to scale to a farm, I'd really like them gone). I'm running IIS7 on Windows Server 2008. Anyone know how I can do this?
推荐答案
在 IIS7 下,Etag 更改号(Etag 后面的部分 : )始终设置为 0.
Under IIS7 the Etag change number (the part of the Etag following : ) is always set to 0.
因此,来自服务器的 Etag 对于同一文件不再因服务器而异,因此 Yahoo 最佳实践不再适用.
Hence the Etag from the server no longer varies from server to server for the same file and therefore the Yahoo best practice no longer really applies.
由于您实际上无法抑制 IIS7 上的 ETag 标头,因此您最好根本不要摆弄它.到目前为止,我发现最有用的配置规则是如果默认设置没有破坏某些内容,请不要理会它".
Since you can't actually suppress the ETag header on IIS7 it would probably be best that you don't fiddle with it at all. I've found by far the most useful configuration rule is "If the default doesn't break something, leave it alone".
这篇关于如何从 IIS7 中删除 eTag 标头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!