| Whats the cleanest code for caching and Gzip (mod deflate)?
|
ewwatson

msg:4517682 | 1:26 am on Nov 10, 2012 (gmt 0) | Whats the cleanest code for caching and Gzip (mod_deflate) in .htacces? I want to speed up my site. Caching and compression are two of the ways I'm going about it. I've seen a few variations around the web. Here is the best one I think I've found. Is it good? Or do you guys suggest different? Thanks! Caching... ##################################################### # CONFIGURE media caching # Header unset ETag FileETag None <filesMatch "(?i)^.*\.(ico|flv|jpg|jpeg|png|gif|js|css)$"> Header unset Last-Modified Header set Expires "Fri, 21 Dec 2012 00:00:00 GMT" Header set Cache-Control "public, no-transform" </filesMatch> # ##################################################### Compression... <ifModule mod_deflate.c> <filesMatch "\.(js|css)$"> SetOutputFilter DEFLATE </filesMatch> </ifModule>
|
|