httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Benner" <Michael.Ben...@gifts.com>
Subject [users@httpd] intermittent problems with mod_deflate compression
Date Fri, 27 Apr 2007 23:26:41 GMT
Hi.  I'm having some intermittent issues with the Apache mod_deflate compression.  When I have
compression turned on (please see my configuration snippet below), my pages load fairly slowly
and I occassionally receive a popup prompt to save the page because it's been returned as
type "application/octet-stream".  When I turn off the compression, everything is fast and
perfectly normal.

It appears, although I'm not 100% certain (and I hope this isn't a red herring), that it may
be related to situations in which Apache returns an HTTP Response Code 304 for javascript
or CSS files.  It seems that the 'text/html' content is coming back fine, but JavaScript and
CSS have troubles.

I'm using Apache version 2.0.59 on Linux Red Hat and Firefox 1.5.0.11 on Windows.  Has anyone
else experienced anything like this?  I haven't been able to find an answer to this problem
yet.  thanks!

<IfModule mod_deflate.c>

        SetOutputFilter DEFLATE
        
        # Can be set 1-9 (just like gzip)
        DeflateCompressionLevel 2

        # Netscape 4.x has some problems...
        BrowserMatch ^Mozilla/4 gzip-only-text/html

        # Netscape 4.06-4.08 have some more problems
        BrowserMatch ^Mozilla/4\.0[678] no-gzip

        # MSIE masquerades as Netscape, but it is fine
        BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

        # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
        # the above regex won't work. You can use the following
        # workaround to get the desired effect:
        BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

        # Don't compress images
        SetEnvIfNoCase Request_URI \
        \.(?:gif|jpe?g|png|zip|gz|swf|vcs|ico)$ no-gzip dont-vary

        # Make sure proxies don't deliver the wrong content
        Header append Vary User-Agent env=!dont-vary

</IfModule>


Michael Benner | gifts.com
8833 Sunset Blvd, 3rd Floor, West Hollywood, CA 90069



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message