I recently set up an Ubuntu 12.04 server with the default LAMP task. Also added virtualmin.
All requests to apache return this in the headers.
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
How/where do i set cache-control to something more sensible to allow browsers to cache content?
Tried putting this in the .htaccess to no avail. mod_expires is enabled. The result is double Cache-Control headers!
<IfModule mod_headers.c>
Header add "Cache-Control" "max-age=3600"
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 3600 seconds"
</IfModule>
Apparently it was related to me starting a php session.
Setting
session_cache_limiter('public')
solved it. You can add it in php.ini or in your script.Looks like your site generating these headers. Check it's code.