青岛网站建设问答

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] 


随机推荐:淄博网站优化  洛阳网站优化  沙河网站优化  辽阳网站优化  福鼎网站优化  三河网站优化  肇庆网站优化  安达网站优化  偃师网站优化  陕西网站优化  晋江网站优化  丽水网站优化  

最新发布