我已将 IIS7 配置为 gzip 静态内容。
http://www.coderjournal.com/2008/04/iis-7-compress-javascript-gzip/
但是,这些文件不会“保持”gzip 压缩。
这是我的用例:
这没有意义——如果原始文件没有改变,是否应该在所有后续请求中传递静态文件的 gzip 版本?
注意:我使用 Firefox 和 Firebug 通过检查 Content-Encoding header 来验证 gzip 压缩的内容。
最佳答案
根据这篇文章:
在 IIS7 中,内容根据其点击频率进行压缩,可配置如下:
<system.webServer>
<serverRuntime enabled="true"
frequentHitThreshold="5"
frequentHitTimePeriod="00:00:20" />
</system.webServer>
也许你没有达到这些阈值?
关于iis - 在 IIS7 中,gzipped 文件不会保持这种状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2203798/