我最近使用默认的LAMP任务设置了Ubuntu 12.04服务器。 还join了virtualmin。
所有对Apache的请求都会在头文件中返回。
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
我如何将caching控制设置为更明智的内容以允许浏览器caching内容?
试图把这个.htaccess无济于事。 mod_expires已启用。 结果是双caching控制标题!
<IfModule mod_headers.c> Header add "Cache-Control" "max-age=3600" </IfModule> <IfModule mod_expires.c> ExpiresActive On ExpiresDefault "access plus 3600 seconds" </IfModule>
显然这与我开始一个php会话有关。
设置session_cache_limiter('public')解决了它。 您可以将其添加到php.ini或脚本中。
看起来像您的网站生成这些头。 检查它的代码。