I've used the built-in compression in IIS6 (Server 2003) - as well as IISxpress (w2000 and XP).
I've been impressed with all the different methods of HTTP compression. They seem to work very well, are easily implemented, and can really make a noticeable difference on large pages. If you pay based on bandwidth - you really can't go wrong.
My initial experience with IIS7 was a little confusing. The revamped UI left me hunting for things - but after you get acclimated, it's not half bad.
The first thing you have to be aware of is that IIS7 has Static Compression enabled by default - but you have to manually turn on Dynamic Compression. This is done via Control Panel - Programs and Features - Turn Windows Features On or Off.
You want to scroll down to Internet Information Services - and drilldown thru World Wide Web Services to Performance Features. You'll notice Static Content Compression is checked by default. To enable Dynamic Compression - simply check the Http Compression Dynamic option. Then clickOK and it will be installed.
The next thing I did was to edit the config :
C:\Windows\System32\Inetsrv\Config\applicationHost.config
Find the httpCompression section.
You'll control which content gets compressed in its dynamicTypes and staticTypes sections. If you're familiar with IIS6 - you'll remember it was controlled by file extension. IIS7 has changed - now you control it by mimeType.
I set mine as follows:
dynamicTypes:
<mimetype="text/*" enabled="true">
<mimetype="message/*" enabled="true">
<mimetype="application/x-javascript" enabled="true">
<mimetype="*/*" enabled="false">
staticTypes
<mimetype="text/*" enabled="true">
<mimetype="message/*" enabled="true">
<mimetype="application/x-javascript" enabled="true">
<mimetype="*/*" enabled="false">
Also find the urlCompression tag. You'll want to enable Static (and possibly Dynamic) content as follows:
<dostaticcompression="true" dodynamiccompression="true">
But remember, it'll all depend on your content. For example, if I were serving already compressed content (like zip's, rar's, etc) - I'd want to exclude those as well.
For reference, a great IIS7 Compression read is on Kanwaljeet Singla's blog.
0 comments:
Post a Comment