Skip to content

Instantly share code, notes, and snippets.

@mikebuchanon
Created July 2, 2013 19:10
Show Gist options
  • Save mikebuchanon/5912160 to your computer and use it in GitHub Desktop.
Save mikebuchanon/5912160 to your computer and use it in GitHub Desktop.
Enable Static File Compression on IIS6
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
@mikebuchanon
Copy link
Author

Excellent write-up of how to do this in IIS can be found here http://www.iis.net/configreference/system.webserver/httpcompression

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment