Welcome to WebmasterWorld Guest from 54.227.101.214

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

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

     

ewwatson

1:26 am on Nov 10, 2012 (gmt 0)

5+ Year Member



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>
 

Featured Threads

Hot Threads This Week

Hot Threads This Month