mummana Posted December 8, 2008 Share Posted December 8, 2008 Hi , We are using mod_defalte module for the compression in apache. But we did not see the JavaScript files are not compress (gzip). But .css files compressing properly. Could you please check the below configurations and response header details for JS and CSS files. Pls. help me regarding. # Directives for compression. Very similar to the example configuration on the # mod deflate documentation page AddEncoding x-compress Z AddEncoding x-gzip gz tgz AddType application/x-tar ..tgz # Compress content SetOutputFilter DEFLATE # Don’t bother compressing images SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary # Netscape Navigator version 4.x can handle only text/html BrowserMatch ^Mozilla/4 gzip-only-text/html # Specific Netscape versions having issues with all compression BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSI[E]\W5 no-gzip dont-vary # Alert proxies of exclusions to compression based on browser type, uri type etc Header append Vary User-Agent Response Header for JS Files (Status-Line) HTTP/1.1 200 OK Server Apache Last-Modified Wed, 03 Dec 2008 15:18:34 GMT Etag "3a6b3-4854-f517e680" Accept-Ranges bytes Content-Type application/javascript Cache-Control public, max-age=291178 Expires Fri, 12 Dec 2008 06:04:07 GMT Date Mon, 08 Dec 2008 21:11:09 GMT Content-Length 18516 Proxy-Connection Keep-Alive Connection Keep-Alive Age 0 Response Header for CSS Files (Status-Line) HTTP/1.1 200 OK Server Apache Last-Modified Wed, 03 Dec 2008 15:18:27 GMT Etag "3a6c7-8b2a-f4ad16c0" Accept-Ranges bytes Content-Type text/css Cache-Control public, max-age=604800 Expires Mon, 15 Dec 2008 21:13:31 GMT Date Mon, 08 Dec 2008 21:13:31 GMT Vary Accept-Encoding Content-Length 8582 Proxy-Connection Keep-Alive Connection Keep-Alive Content-Encoding gzip Age 0 Best Regards, Srini Quote Link to comment 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.