Apache: JS Compession Gzip

<IfModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_minimum_file_size 512 mod_gzip_maximum_file_size 1000000 mod_gzip_item_include file \.js$ mod_gzip_item_include mime ^application/x-javascript.* </IfModule> # Cache <IfModule mod_expires.c> ExpiresActive on ExpiresByType application/x-javascript "access plus 2 month" ExpiresByType application/javascript "access plus 2 month" ExpiresByType text/javascript "access plus 2 month" </IfModule>
Content .htaccess file in the directory containing the JS files

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.