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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.