Cache static content

On some statistics sites you will receive messages that you need to Cache Static Content.

The easiest way is to do it by .htaccess
 
Just add the following lines in your .htaccess root file:
FileETag MTime Size
<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On
  # Cache all files for 2 weeks after access (A).
  ExpiresDefault A1209600
  <FilesMatch \.php$>
    # Do not allow PHP scripts to be cached unless they explicitly send cache
    # headers themselves. Otherwise all scripts would have to overwrite the
    # headers set by mod_expires if they want another caching behavior.
    ExpiresActive Off
  </FilesMatch>
</IfModule>
 

Leave a Reply

Your email address will not be published. Required fields are marked *