royfake Posted July 5, 2007 Share Posted July 5, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/58587-compression-on-behalf-of-a-user-agent-possible/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.