onsa
1/18/2017 - 2:22 PM

Limit lifespan of served data

Limit lifespan of served data

to limit caching time for served data
open .htaccess and add e.g.:

  ExpiresActive On
  ExpiresDefault "access plus 10 days"
  ExpiresByType text/html "access plus 1 month 15 days 2 hours"
  ExpiresByType image/gif M604800
  
(M604800 means a week after file's last modification;
A2592000 would mean a month after file's last access by client;
numbers are in seconds)