WYSIWYG

http://kufli.blogspot.com
http://github.com/karthik20522

Tuesday, December 25, 2007

IIS 7.0 HTTP Compression

While poking around with IIS 7 I stumbled upon on how easy it was to setup http compression to both static files and dynamic responses. One of advantages of compressing static files on IIS 7 is that it can be cached. So all request for the static file would be served from cache unlike the dynamic responses where the response data has to compressed on the fly (a performance hit on the server CPU).
To enable static compression do the following:
1)By default 'Compression' feature was not installed on my IIS so I had to navigate to Enable "Performance Features" on Windows features in Control Panel and select the "Static Content Compression".

2) Now to enable Compression for you site, follow the steps:
a.Open IIS Manager and navigate to the level you want to manage.
b.In Features View, double-click Compression.

c.On the Compression page, select the box next to Enable static content compression.

d.Click Apply in the Actions pane.

3)To verify if the static compression is working, I used Firebug (plugin for Firefox) and verified the repsonse headers.

Labels: ,