因此,最近我将IIS6配置为压缩文件,现在大多数文件都是压缩在JavaScript和CSS文件之外的。有没有人知道是什么原因导致他们不被压缩。
我知道这是因为Yslow外接程序和我设置的压缩目录(见下面)是空的。
服务选项卡设置:
Metabase.xml片段:
<IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/deflate"
HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
HcCreateFlags="0"
HcDoDynamicCompression="TRUE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="TRUE"
HcDynamicCompressionLevel="5"
HcFileExtensions="htm
html
txt
ppt
xls
xml
pdf
xslt
doc
xsl
htc
js
css"
HcOnDemandCompLevel="10"
HcPriority="1"
HcScriptFileExtensions="asp
dll
exe
aspx
asmx
axd"
>
</IIsCompressionScheme>
<IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/gzip"
HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
HcCreateFlags="1"
HcDoDynamicCompression="TRUE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="TRUE"
HcDynamicCompressionLevel="5"
HcFileExtensions="htm
html
txt
ppt
xls
xml
pdf
xslt
doc
xsl
htc
js
css"
HcOnDemandCompLevel="10"
HcPriority="1"
HcScriptFileExtensions="asp
dll
exe
aspx
asmx
ashx
axd"
>
</IIsCompressionScheme>我还授予IUSR_{machinename}写入"%windir%\IIS临时压缩文件“的权限。
我错过了什么?
谢谢你的帮助
发布于 2011-04-26 10:23:42
从HcFileExtensions中删除js和css扩展并将它们添加到HcScriptFileExtensions中。
重新启动IIS及其全部工作
发布于 2011-08-24 20:59:54
遵循本教程中的所有步骤,您应该做得很好:
http://engineering.leads360.com/post/9301650692/http-compression-gzip-on-iis-6
https://serverfault.com/questions/262077
复制相似问题