views:

2118

answers:

5

I have enabled IIS 6's built in HTTP compression for the following types of files:

    HcFileExtensions="htm
  html
  txt
  css
  js"

 HcScriptFileExtensions="asp
  dll
  exe
  aspx
  asmx
  ascx"

I am unclear however if it's appropriate to add the axd extension so that my WebResource.axd files will be compressed.

Lastly, are there any other obvious extensions for an asp.net 2.0 site that I may have missed?

+1  A: 

This article says there a potential problems using compression with the web resources axd extension. The author recommends excluding this extension from any compression.

Simon Johnson
I did see that article and a few others related to the use of the Blowery module. I was hoping to find somebody that specifically did try this using native IIS compress and either had success or didn't have success.
Don
A: 

I run an ASP.NET 2.0 application on IIS 6.0 and added .axd to the HcScriptFileExtensions list without it causing any obvious problems over the last few months.

However, ScriptManager does not by default compress ScriptResource.axd when the user agent indicates IE6, but with this setup the IE6 user would still get a compressed version. You may not want this behavior.

Noah Jacobson
A: 

You don't have the ashx extension listed for HttpHandlers. I've seen a lot of libraries use it for outputting javascript.

Mike L
A: 

Actually now that you mention this topic: Compressing CSS can be a problem too - IE 6 can crash when being served compressed CSS.

Unfortunately I haven't got any links to back this statement, it's merely something I heard from our head of development.

Since CSS is usually somewhat small compared to the rendered html, I always omit compressing CSS - just in case it's true.

Edit: Just stumbled upon a link from MS mentioning this very issue - it also mentions js as a potential problem: http://support.microsoft.com/kb/825057

Steffen
A: 

I would just like to give some feedback on what I have done so far. I haven't tried Blowery yet as I wanted to explore using HttpCompression within iis 6 to see how it went, or initially whether it would work with .axd files. To test for the compression statistics on my pages I used the Yahoo add-in for Firefox called YSlow. This add-in appears to me to be intuitive and very helpful.

So I had already turned on iis6 httpcompression on windows server 2003, configuring compression for css,js and aspx files amongst others and then established the files that were/were not being compression using YSlow. Needless to say the webResource.axd files were not being compressed, but the other files were.

Then I changed the iis metabase.xml file to include the file extension axd in the HcScriptFileExtensions property. After I restarted iis the test results from YSlow now showed all webResource.axd files being compressed. I am still testing the functionality to check all client side stuff works as expected, but nothing has been broken so far. I hope this helps other folks

I'd be interested in seeing what your client side testing results yield.
Don