如何压缩IIS网页大小(IIS6.0)

步骤:

1. 在internet 信息服务/网站 右键属性/服务/http压缩 将2个勾选中

2.  打开文件  C:\Windows\System32\inetsrv\MetaBase.xml

   (记得首先备份这个文件)

  找到节点 <IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/gzip" 

  如果修改的时候 提示正在使用这个文件 请在服务里面停止IIS Admin Service服务

(会将 World Wide Web Publishing Service 和 HTTP SSL 同时停止)

 在修改结束后  再重新启动服务

IIS Admin Service 

World Wide Web Publishing Service

HTTP SSL

  将这个节点的内容修改为:

 HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
  HcCreateFlags="1"
  HcDoDynamicCompression="TRUE"
  HcDoOnDemandCompression="TRUE"
  HcDoStaticCompression="TRUE"
  HcDynamicCompressionLevel="0"
  HcFileExtensions="htm
   html
   txt
   css
   htc
   js
   xml
   txt"
  HcOnDemandCompLevel="9"
  HcPriority="1"
  HcScriptFileExtensions="asp
   dll
   exe
   aspx"

3. 在设置成功后  有的时候  需要重新启动计算机 修改的MetaBase 才起作用

原文地址:https://www.cnblogs.com/zhwl/p/1959475.html