Forum Moderators: phranque
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A0
ExpiresByType text/css "access 1 days"
ExpiresByType text/plain "access 1 days"
ExpiresByType text/javascript "access 1 days"
ExpiresByType application/javascript "access 1 days"
ExpiresByType image/bmp "access 7 days"
ExpiresByType image/gif "access 7 days"
ExpiresByType image/ief "access 7 days"
ExpiresByType image/jpeg "access 7 days"
ExpiresByType image/png "access 7 days"
ExpiresByType image/tiff "access 7 days"
ExpiresByType image/svg "access 7 days"
ExpiresByType image/svg+xml "access 7 days"
ExpiresByType audio/basic "access 2 weeks"
ExpiresByType audio/midi "access 2 weeks"
ExpiresByType audio/mpeg "access 2 weeks"
ExpiresByType application/ogg "access 2 weeks"
ExpiresByType video/mpeg "access 2 weeks"
</IfModule>
# no caching for this domain during web development
ExpiresActive On
ExpiresDefault A0
ExpiresActive Off
I also tried the following in my virtualhost container:
ExpiresActive Off
This directive enables or disables the generation of the Expires and Cache-Control headers for the document realm in question.
If I explicitly give it a 'no-cache' header, how is that going to coexist with the default 'Expires' headers that mod_expires is sending?
When the Expires header is already part of the response generated by the server, for example when generated by a CGI script or proxied from an origin server, this module does not change or add an Expires or Cache-Control header.
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").
To mark a response as "already expired," an origin server sends an Expires date that is equal to the Date header value.