Friday, February 5, 2010

Compression in IIS

 A great feature that IIS provides is of compression that helps in improvement of website performance. Few points regarding IIS compression are below:
  • Http compression can make a big difference to performance if bandwidth (size) is the issue, especially if you are talking to non-local clients - and is worth including in most web applications
  • if your pages are slow because of how the processing at the server works, it won't make any difference at all... it only improves the server -> client measure
  • it requires a client (browser) that accepts compression (although this is negotiated in the http headers, so it should "fail safe" for old clients)
  • but you need to watch out; if you still support IE 5?6?, there are a number of major bugs here (especially with ajax etc) - test on the clients you expect to see
  • use Fiddler to check that it is working (as a developer, Fiddler should be one of your closest friends...)
For compression in IIS 7 refer to this article.
To activate HTTP compression in IIS 6:
  1. Launch the IIS Management MMC snap-in (shortcut inetmgr).
  2. Locate the 'Web Sites' node in the left hand side tree pane.
  3. Right click on 'Web Sites' then select 'Properties'.
  4. Click on the Services tab.
  5. Choose the HTTP compression type from the HTTP compression panel.
  6. Click OK.

For more details on compression in IIS 6 refer MSDN
In IIS 6, setting compression this way (using IIS's own compression mechanism) is all or nothing for all your sites. Check link to the TechNet article on how to use adsutil to gain more fine grained control over this.

No comments:

Post a Comment

Comments to this post

LinkWithin

Related Posts with Thumbnails