Return to Snippet

Revision: 42522
at March 6, 2011 05:41 by discipolo


Initial Code
# Cache specified files for 31 days
  <filesmatch "\.(ico|flv|jpg|jpeg|png|gif|swf)$">
  Header set Cache-Control "max-age=2678400, public"
  </filesmatch>
  # Cache HTML files for a couple hours
  <filesmatch "\.(html|htm)$">
  Header set Cache-Control "max-age=7200, private, must-revalidate"
  </filesmatch>
  # Cache PDFs for a day
  <filesmatch "\.(pdf)$">
  Header set Cache-Control "max-age=86400, public"
  </filesmatch>
  # Cache CSS for 6 days
  <filesmatch "\.(css|css.gz)$">
  Header set Cache-Control "max-age=518400, private"
  </filesmatch>
  # Cache Javascripts for 31 days
  <filesmatch "\.(js|js.gz)$">
  Header set Cache-Control "max-age=2678400, private"
  </filesmatch>
  
  Header append Vary Accept-Encoding
    # Turn ETags Off
    <IfModule mod_headers.c>
       Header unset ETag
    </IfModule>

  FileETag None

Initial URL
http://blog-das-oertchen.de/blog/2011/02/15/drupal-sinnvolle-optimierungen-teil-3

Initial Description
yslow optimization

Initial Title
ETag and expire headers for drupal 7

Initial Tags


Initial Language
PHP