Created
July 2, 2013 19:10
-
-
Save mikebuchanon/5912160 to your computer and use it in GitHub Desktop.
Enable Static File Compression on IIS6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM Enable Statis File Compression on IIS6 Web Server | |
REM Requires that adsutil.vbs be installed in c:\inetpub\adminscripts | |
REM Enable Static File Compression | |
cscript.exe c:\inetpub\adminscripts\adsutil.vbs set w3svc/filters/compression/parameters/HcDoStaticCompression true | |
REM Tell server to only use 1G of Space | |
cscript.exe c:\inetpub\adminscripts\adsutil.vbs set w3svc/filters/compression/parameters/HcDoDiskSpaceLimiting true | |
cscript.exe c:\inetpub\adminscripts\adsutil.vbs set w3svc/filters/compression/parameters/HcMaxDiskSpaceUsage 1073741824 | |
REM Support got GZIP and DEFLATE for the files with the following extensions | |
cscript.exe c:\inetpub\adminscripts\adsutil.vbs set W3Svc/Filters/Compression/GZIP/HcFileExtensions htm html js css xml xlt txt ppt xls pdf xslt doc xsl htc | |
cscript.exe c:\inetpub\adminscripts\adsutil.vbs set W3Svc/Filters/Compression/DEFLATE/HcFileExtensions htm html js css xml xlt txt ppt xls pdf xslt doc xsl htc | |
REM Force Restart of W3SVC | |
net stop iisadmin /y | |
net start w3svc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Excellent write-up of how to do this in IIS can be found here http://www.iis.net/configreference/system.webserver/httpcompression