dongniaoli1822 2014-09-24 10:30
浏览 43

标题中的双缓存控制行

I have set the next line in nginx:

add_header Cache-Control "max-age=259200, public";

but headers from my response look like:

Cache-Control:max-age=259200, public
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection:keep-alive
Content-Encoding:gzip
Content-Type:text/html
Date:Wed, 24 Sep 2014 10:21:32 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Pragma:no-cache
Server:nginx/1.1.19
Transfer-Encoding:chunked
X-Powered-By:PHP/5.3.10-1ubuntu3

I have checked and I don't send other headers from server side script (PHP). How can I solve this problem...?

Update: I have discovered that this is only at PHP-generated responses...

  • 写回答

1条回答 默认 最新

  • douju1968 2014-09-24 10:46
    关注

    I solved this problem adding the next line session_cache_limiter(false); before session_start();.

    评论

报告相同问题?

悬赏问题

  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 个人网站被恶意大量访问,怎么办
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大