青岛网站建设问答

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] 


随机推荐:灌南网站优化  秦皇岛网站优化  阳江网站优化  玉田网站优化  甘南网站优化  阜宁网站优化  站群SEO  青岛seo  姜堰网站优化  澧县网站优化  锡林网站优化  保山网站优化  

最新发布