5 ms·
Caching is specified as: FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|mp3|mp4)$" Header set Cache-Control "public" Header set Expires "Thu, 15 Apr 2016 20:0
by xpose2000 14y ago
Caching is specified as:
FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|mp3|mp4)$"
Header set Cache-Control "public"
Header set Expires "Thu, 15 Apr 2016 20:00:00 GMT"
Header unset Last-Modified
FilesMatch "\.(html|htm|xml|txt|xsl)$"
Header set Cache-Control "max-age=7200, must-revalidate"
FilesMatch "\.(js|css)$"
Header set Cache-Control "public"
Header set Expires "Thu, 15 Apr 2016 20:00:00 GMT"
Header unset Last-Modified
- huxley 14y agoYou may want to avoid setting Expires to greater than 1 year, RFC 2616 (HTTP), section 14.21: "To mark a response as 'never expires,' an origin server sends an Expires date approximately one year from the time the response is sent. HTTP/1.1 servers SHOULD NOT send Expires dates more than one year in the future." If an agent is precisely following the RFC, anything set to more than 1 year in the future is an invalid date and: "HTTP/1.1 clients and caches MUST treat other invalid date formats, especially including the value '0', as in the past (i.e., 'already expired')."
- xpose2000 14y agoVery good tip! I'll have to change those to one year. :)