Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
06-23-2012, 08:47 PM #1
- Join Date
- May 2011
- Thanked 6 Times in 6 Posts
Turning on GZip Compression for CSS and JS
How would I go about turning on GZip for css and js files only, via .htaccess and httpd.config?
Every method I've seem to find ends up de-linking my css files, so I end up with a non-styled site.
I'm running a second domain for all of my static files; that's the domain I've been uploading my .htaccess to.
Here's what I have right now, and according to Google PageSpeed it does nothing:
Header unset ETag FileETag None <filesMatch "(?i)^.*\.(ico|flv|jpg|jpeg|png|gif|js|css)$"> Header unset Last-Modified Header set Cache-Control "max-age=864000, public" </filesMatch> <ifModule mod_deflate.c> <filesMatch "\.(js|css)$"> SetOutputFilter DEFLATE </filesMatch> </ifModule>