Jump to content

compression on behalf of a user agent possible?


royfake

Recommended Posts

Hi,

 

Can I get apache to compress data on behalf of the browser/agent?

 

I am running a web app from my site. When the apps' initialization files download (xpi or cab) and run on the client machine it opens a connection to the apache server and retrieves a bunch of DLL files (~20MB).

My problem is that the app connects as an independent user agent which apache with mod_deflate does not recognize as being able to support compression, so the DLL files get sent in their full size.

 

Here is my mod_deflate config (after enabling the module):

<IfModule mod_deflate.c>
##
## Which type of files do we want to compress:
##
#AddOutputFilterByType DEFLATE application/octet-stream
AddOutputFilter DEFLATE dll
##
## Format the log file in the following way:
##
DeflateFilterNote Input input_info
DeflateFilterNote Output output_info
DeflateFilterNote Ratio ratio_info
LogFormat '"%{User-Agent}i" "%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate
CustomLog "C:\Apache\Apache2\logs\deflate.log" deflate
##
## Disable compression for older browsers
##
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>

 

If I point my browser to a specific file location apache will compress and serve it. Now, when the app requests the same files they will be served not compressed.

 

Any suggestions, solutions..?

 

Best regards,

Roy

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.