It's good to compress all of your static web files for your users. It means faster downloads for your users. You may be vaguely aware that IIS can gzip your javascript and css files for you, but if you're like me you've been too lazy to figure out how to set it up. Also, if you're like me, you look at a page like this very helpful article from Microsoft and say, "What, you expect me to read all of this!"
Using HTTP Compression for Faster Downloads (IIS 6.0)
Well, this page is for people like me. I didn't actually read the whole page, but I did read enough to get the basics and figure out the steps to set up gzip compression, and here they are!
- Enable HTTP Compression
- Open IIS Manager
- Right-click "Web Site" and select "Services" tab.
- Check "Compress Static Files"
- Click "Okay"
- Specify that "js" and "css" file should be compressed by changing the metabase. By default, IIS 6.0 is set up to compress htm, html, and txt files.
- Open a command prompt
- cd to C:\Inetpub\AdminScripts (assuming the default location)
- run this command (you can change the list of extensions, but only specify static, compressible files here):
cscript.exe adsutil.vbs set w3svc/Filters/Compression/GZIP/HcFileExtensions "htm" "html" "txt" "js" "css"
- Restart the World Wide Web Publishing Service
That's it! If you want more details information, want to set up different compression for different sites, or want to compress dynamic pages too, you should of course read the above link.