我如何知道 IIS 是否真的在压缩我的 HTML?
我们的 IIS 服务器启用了动态和静态 HTML 压缩,但是当我浏览到我们的网站并在 Fiddler 中查看响应标头时,我只看到一个资源(Flash 文件)的“Content-Encoding: gzip”标头。
为什么其他响应类型没有此标头?这是否意味着压缩对其他响应不起作用?
Our IIS server has Dynamic and Static HTML Compression enabled, but when I browse to our website and view the Response Headers in Fiddler, I only see the "Content-Encoding: gzip" header for one resource (a flash file).
Why would the other response types not have this header? Does it mean that compression is NOT working for the other responses?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
100% 确保压缩处于活动状态的唯一方法是将下载资源的大小与服务器上的原始文件的大小进行比较。 Firebug 扩展的网络选项卡可以在这里为您提供帮助。
The only way to be 100% sure that compression is active is to compare the size of the downloaded resource against the original file on the server. The network tab of the Firebug extension can help you here.
看起来我们公司的网络实际上正在删除内容编码标头。 (我不知道为什么)。当我在家浏览时,gzip 似乎工作正常。 StackExchange.com 上的这篇文章对我有帮助弄清楚。
It looks like our company network was actually stripping out the Content-Encoding header. (I have no idea why). When I browse from home the gzipping seems to work fine. This post on StackExchange.com helped me figure it out.