I have an ASP.NET webforms application (3.5 SP1) that I'm working on, and attempting to enable gzip fpr HTML and CSS that comes down the pipe. I'm using this implementation (and tried a few others that hook into Application_BeginRequest), and it seems to be corrupting the external CSS file that the pages use, but intermittently...suddenly all styles will disappear on a page refresh, stay that way for awhile, and then suddenly start working again.
Both IE7 and FF3 exhibit this behavior. When viewing the CSS using the web developer toolbar, it returns jibberish. The cache-control header is coming through as "private," but I don't know enough to figure out if that's a contributing factor or not.
Also, this is running on the ASP.NET Development Server. Maybe it'd be fine with IIS, but I'm developing on XP and it'd be IIS5.
Is it only CSS files that get corrupted? Do JS files (or any other static text files) come through ok?
Also can you duplicate the behavior if you browse directly to the CSS file?
I've only enabled compression on Windows 2003 server's IIS using this approach:
Name Http Compression Required Files %systemroot%\system32\inetsrv\gzip.dll
%systemroot%\system32\inetsrv\MetaBase.xml
Location ="/LM/W3SVC/Filters/Compression/gzip"
png
, css
, js
and any other static file extensions to HcFileExtensions
aspx
and any other executable extensions to HcScriptFileExtensions
iisreset
) If you have a Windows 2003/2008 server to play with you could try that approach.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With