用gzip压缩我的asp页面

时间:2013-12-10 20:33:13

标签: asp-classic gzip

尝试压缩我的asp页面,完成此操作但没有,我该怎么办?

    <httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
    <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll"/>
    <dynamicTypes>
        <add mimeType="text/*" enabled="true"/>
        <add mimeType="message/*" enabled="true"/>
        <add mimeType="application/javascript" enabled="true"/>
        <add mimeType="*/*" enabled="false"/>
    </dynamicTypes>
    <staticTypes>
        <add mimeType="text/*" enabled="true"/>
        <add mimeType="message/*" enabled="true"/>
        <add mimeType="application/javascript" enabled="true"/>
        <add mimeType="*/*" enabled="false"/>
    </staticTypes>
    </httpCompression>
    <urlCompression doStaticCompression="true" doDynamicCompression="true"/>

1 个答案:

答案 0 :(得分:0)

步骤1:按照microsoft网站上的说明启用压缩。请参阅2013年12月12日的链接。

enter image description here

步骤2:确保已启用直接元数据库编辑。

步骤3:停止所有与IIS相关的服务,并在file \ system32 \ inetsrv \ metabase.xml中进行更改:

<IIsCompressionScheme      Location ="/LM/W3SVC/Filters/Compression/deflate"
              HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
              HcCreateFlags="0"
              HcDoDynamicCompression="TRUE"
              HcDoOnDemandCompression="TRUE"
              HcDoStaticCompression="TRUE"
              HcDynamicCompressionLevel="10"
              HcFileExtensions="css
                     txt
                     gif
                     png
                     js
                     htm
                     html"
              HcOnDemandCompLevel="10"
              HcPriority="1"
              HcScriptFileExtensions="asp
                     dll
                     exe"
       >
</IIsCompressionScheme>
<IIsCompressionScheme      Location ="/LM/W3SVC/Filters/Compression/gzip"
              HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
              HcCreateFlags="1"
              HcDoDynamicCompression="TRUE"
              HcDoOnDemandCompression="TRUE"
              HcDoStaticCompression="TRUE"
              HcDynamicCompressionLevel="10"
              HcFileExtensions="css
                     txt
                     gif
                     png
                     js
                     htm
                     html"
              HcOnDemandCompLevel="10"
              HcPriority="1"
              HcScriptFileExtensions="asp
                     dll
                     exe"
       >
</IIsCompressionScheme>