why would anyone set (Apache mod_expires parameter) ExpiresByType to "access plus 0 seconds"? why would anyone set (Apache mod_expires parameter) ExpiresByType to "access plus 0 seconds"? apache apache

why would anyone set (Apache mod_expires parameter) ExpiresByType to "access plus 0 seconds"?


If text/html only meant "content from static HTML files", you'd be right, and you'd want to set a longer cache life. But server-side scripts typically also return a web page; that is, their responses' Content-Type will often be text/html as well. And if all HTML were cached, dynamically generated content might not appear to update properly.

If you wanted to expire only non-static HTML, you might be able to do something like

<FilesMatch "\.php$">    ExpiresByType text/html "access plus 0 seconds"</FilesMatch>

(using PHP as an example).