.htaccess file

<ifmodule mod_deflate.c>
    AddOutputFilter DEFLATE html htm xml php js css
</ifmodule>

<ifModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault A86400
    ExpiresByType image/x-icon A2592000
    ExpiresByType application/x-javascript A2592000
    ExpiresByType application/javascript A2592000
    ExpiresByType text/css A2592000
    ExpiresByType image/gif A604800
    ExpiresByType image/png A604800
    ExpiresByType image/jpeg A604800
    ExpiresByType text/plain A604800
    ExpiresByType application/x-shockwave-flash A604800
    ExpiresByType video/x-flv A604800
    ExpiresByType application/pdf A604800
    ExpiresByType text/html A900
</ifModule>

The expiration

  • 900 = 60s × 15m
  • 86400 = 3600s × 24h × 1d
  • 604800 = 3600s × 24h × 7d
  • 2592000 = 3600s × 24h × 30d