Expiry

HTTP header sets an expiry duration.

  1. The client stores the data and expiry timestamp.
  1. stores must_revalidate flag.

https://gtmetrix.com/add-expires-headers.html

ExpiresByType <mime type> <duration>

http://stackoverflow.com/a/31685334/483588

<IfModule mod_expires.c>

ExpiresActive on.

ExpiresDefault "access plus 1 month".

ExpiresByType image/gif "access plus 1 month".

ExpiresByType image/png "access plus 1 month".

ExpiresByType image/jpg "access plus 1 month".

ExpiresByType image/jpeg "access plus 1 month".

ExpiresByType text/html "access plus 3 days".

ExpiresByType text/xml "access plus 1 seconds".

ExpiresByType text/plain "access plus 1 seconds".

ExpiresByType application/xml "access plus 1 seconds".

ExpiresByType application/rss+xml "access plus 1 seconds".

ExpiresByType application/json "access plus 1 seconds".

ExpiresByType text/css "access plus 1 week".

ExpiresByType text/javascript "access plus 1 week".

ExpiresByType application/javascript "access plus 1 week".

ExpiresByType application/x-javascript "access plus 1 week".

ExpiresByType image/x-ico "access plus 1 year".

ExpiresByType image/x-icon "access plus 1 year".

ExpiresByType application/pdf "access plus 1 month".

<IfModule mod_headers.c>

Header unset ETag.

Header unset Pragma.

Header unset Last-Modified.

Header append Cache-Control "public, no-transform, must-revalidate".

Header set Last-modified "Tue, 1 Oct 2014 10:10:10 GMT".

<IfModule </IfModule>
<IfModule </IfModule>
Updated: 2026 Aug 19