views:

28

answers:

2

I have written ashx which merges and remove white-spaces for javascript and css contents.
Using VS2010 ASP.NET Development Server everything works fine.

But in IIS7, text/javascript contents are not compressed (I'm using fiddler to monitor it).

I don't have problem with text/css contents and both of the contents are handled by the same ashx file.

+1  A: 
Richard
I've enabled dynamic compression in web.config in webserver section the httpcompression and urlcompression
Tajan
+1  A: 

What are your compression settings in IIS? Do you have dynamic script compression enabled?

I found it much easier to implement my own filter for compression than rely on IIS.

Also, on a side note, you are aware that if you call your CSS through an ASHX file all paths in the CSS will be relative to the ASHX and not the CSS file?

Lloyd
I've also implemented my own httpcompression module. Thanks for the point on css relative path, I have considered it.
Tajan