青岛网站建设问答

win2003 IIS6如何一键开启GZIP压缩?

2016-04-01 23:39:04作者: 青岛网站建设
热门推荐:吐鲁番SEO  毕节SEO  伊春SEO  南通SEO  江苏SEO  平邑SEO  赤峰SEO  眉山SEO  黄冈SEO  承德SEO  陵水SEO  宝鸡SEO  库尔勒SEO  永城SEO  嘉峪关SEO  东阳SEO  临沧SEO  嵊州SEO  

IIS6默认情况下没有开启GZIP功能,需要我们手动配置,但他又没提供图形化配置功能,一步一步配置挺麻烦的,所以从网上找了这个脚本,本人已经测试过来,运行一个多月,暂时没发现有什么问题。 

适用于自己有服务器的,安装后全站自动都启用了GZIP。 

现在基本上大站都启用GZIP了,没用过的不妨试试。 

下载:http://pan.baidu.com/s/1hsnS3UO


[code]

REM Setup IIsCompressionScheme for deflate 

cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcCompressionDll "%windir%\system32\inetsrv\gzip.dll" 

cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcCreateFlags 0 

cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcDoDynamicCompression TRUE 

cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcDoOnDemandCompression TRUE 

cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcDoStaticCompression TRUE 

cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcDynamicCompressionLevel 9 

cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcFileExtensions "htm" "html" "txt" "js" "xml" "css" 

cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcOnDemandCompLevel 9 

cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcPriority 1 

cscript adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcScriptFileExtensions "asp" "dll" "exe" "aspx" "asmx" 



REM Setup IIsCompressionScheme for GZip 

cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcCompressionDll "%windir%\system32\inetsrv\gzip.dll" 

cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcCreateFlags 1 

cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcDoDynamicCompression TRUE 

cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcDoOnDemandCompression TRUE 

cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcDoStaticCompression TRUE 

cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcDynamicCompressionLevel 9 

cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcFileExtensions "htm" "html" "txt" "js" "xml" "css" 

cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcOnDemandCompLevel 9 

cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcPriority 1 

cscript adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcScriptFileExtensions "asp" "dll" "exe" "aspx" "asmx" 


REM Setup IIsCompressionSchemes parameters 

cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcCacheControlHeader max-age=86400 

cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcCompressionBufferSize 102400 

cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcCompressionDirectory "%windir%\IIS Temporary Compressed Files" 

cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcDoDiskSpaceLimiting FALSE 

cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcDoDynamicCompression TRUE 

cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcDoOnDemandCompression TRUE 

cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcDoStaticCompression TRUE 

cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcExpiresHeader "Wed, 01 Jan 1997 12:00:00 GMT" 

cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcFilesDeletedPerDiskFree 256 

cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcIoBufferSize 102400 

cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcMaxDiskSpaceUsage 0 

cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcMaxQueueLength 1000 

cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcMinFileSizeForComp 1 

cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcNoCompressionForHttp10 FALSE 

cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcNoCompressionForProxies FALSE 

cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcNoCompressionForRange FALSE 

cscript adsutil.vbs set W3SVC/Filters/Compression/Parameters/HcSendCacheHeaders FALSE 


iisreset

[/code] 


随机推荐:锦州网站优化  山西网站优化  台山网站优化  桦甸网站优化  大兴安岭网站优化  嘉峪关网站优化  金坛网站优化  新乡网站优化  江西网站优化  济南网站优化  文山网站优化  陵水网站优化  

最新发布