本文介绍了如何cmpress ScriptResource.axd文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想压缩ScriptResource.axd文件,如何压缩它?

我也想推迟对该文件的解析,这可行吗?如果是,请为此提供解决方案.

谢谢大家.

I want to compress ScriptResource.axd file, How can I compress it?

And I also want to defer parsing of this file.Is it posible? If yes, please provide solution for this.

Thanks All.

推荐答案

@ECHO OFF
ECHO.

IF "%1"=="" GOTO ERROR1

ECHO BACKING UP THE METABASE FILE

IF EXIST C:\Inetpub\AdminScripts\adsutil.vbs (SET ADSFILE=C:\Inetpub\AdminScripts\adsutil.vbs)
IF EXIST D:\Inetpub\AdminScripts\adsutil.vbs (SET ADSFILE=D:\Inetpub\AdminScripts\adsutil.vbs)

ECHO ADS FILE LOCATION IS %ADSFILE%

IF "%ADSFILE%" == "" GOTO ERROR2

copy c:\winnt\system32\inetsrv\Metabase.xml %1

ECHO Adding settings for IIS6 HTTP Compression ECHO.
cscript %ADSFILE% set /w3svc/filters/compression/deflate/HcFileExtensions "css" "htc" "htm" "html" "txt" "js"
cscript %ADSFILE% set /w3svc/filters/compression/deflate/HcDynamicCompressionLevel "8"
cscript %ADSFILE% set /w3svc/filters/compression/deflate/HcOnDemandCompLevel "10"
cscript %ADSFILE% set /w3svc/filters/compression/deflate/HcScriptFileExtensions "asp" "exe" "aspx" "pser" "axd"
cscript %ADSFILE% set /w3svc/filters/compression/deflate/HcDoStaticCompression "FALSE"

cscript %ADSFILE% set /w3svc/filters/compression/gzip/HcFileExtensions "css" "htc" "htm" "html" "txt" "js"
cscript %ADSFILE% set /w3svc/filters/compression/gzip/HcDynamicCompressionLevel "8"
cscript %ADSFILE% set /w3svc/filters/compression/gzip/HcDoStaticCompression "TRUE"
cscript %ADSFILE% set /w3svc/filters/compression/gzip/HcOnDemandCompLevel "10"
cscript %ADSFILE% set /w3svc/filters/compression/gzip/HcScriptFileExtensions "asp" "exe" "aspx" "pser" "axd"


ECHO.
ECHO.
ECHO Changes completed. Do an iisreset for changes to have effect!
ECHO.
PAUSE
goto EXITERROR

:ERROR1
ECHO PLEASE PROVIDE BACKUP LOCATION.
goto EXITERROR

:ERROR2
ECHO ADSUTIL.VBS LOCATION IS NOT IDENTIFIED.PLEASE CONTACT CITI SME.

:EXITERROR



4.重新启动IIS



4. Restart the IIS


这篇关于如何cmpress ScriptResource.axd文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 06:46