zoukankan      html  css  js  c++  java
  • IIS6设置GZIP

    1、IIS里要设置


    2、C:/WINDOWS/system32/inetsrv/MetaBase.xml要设置

    该文件很重要,请修改前先备份! 


    <IIsCompressionScheme    Location ="/LM/W3SVC/Filters/Compression/deflate"
            HcCompressionDll="%windir%/system32/inetsrv/gzip.dll"
            HcCreateFlags="0"
            HcDoDynamicCompression="TRUE"
            HcDoOnDemandCompression="TRUE"
            HcDoStaticCompression="FALSE"
            HcDynamicCompressionLevel="9"
            HcFileExtensions="htm
                html
                shtml
                txt
                js
                css
    "
            HcOnDemandCompLevel="10"
            HcPriority="1"
            HcScriptFileExtensions="aspx
                ascx
                asmx
                ashx
                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="9"
            HcFileExtensions="htm
                html
                shtml
                txt
                js
                css
    "
            HcOnDemandCompLevel="10"
            HcPriority="1"
            HcScriptFileExtensions="aspx
                ascx
                asmx
                ashx
                asp
                dll
                exe
    "
        >
    </IIsCompressionScheme>

    注意 蓝色的这些值,一定要每行一个,排在一行,用空格隔开是不行的。


    正常保存的时候,因为IIS正在使用,应该会失败。需要先将IIS停止,再保存,然后再开启IIS。

    命令:iisreset /stop

    iisreset /start

    3、到中国站长网检测检测

    http://tool.chinaz.com/Gzips/

  • 相关阅读:
    1015. 德才论
    1014. 福尔摩斯的约会
    1013. 数素数
    1012. 数字分类
    1011. A+B和C
    1010. 一元多项式求导
    1009. 说反话
    1008. 数组元素循环右移问题
    1007. 素数对猜想
    1006. 换个格式输出整数
  • 原文地址:https://www.cnblogs.com/leftfist/p/4258113.html
Copyright © 2011-2022 走看看