I have a server serving up a JS file a few million times a day using apache2. Some of my users would like the JS to be gzipped. Does anyone know how apache2 mod_deflate handles compression of static files? Will it compress the js for each request(in which case I'd be worried about cpu load)? If it does, is there a way to pre-compress the JS files so apache2 wouldn't have to do this for each file?
Apache2 mod_deflate static content
apache-2.2mod-deflatestatic-content
Best Answer
You can do it with
then precompress the file as whatever.js.gz using
However, if there are older browsers that may break with this.
In the apache config
Remove