簡體   English   中英

標頭中的雙緩存控制行

[英]Double Cache-control line in headers

我在nginx中設置了下一行:

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

但是我的回應中的標題如下:

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

我已經檢查過,並且不從服務器端腳本(PHP)發送其他標頭。 我怎么解決這個問題...?

更新:我發現這僅適用於PHP生成的響應...

我添加了下一行session_cache_limiter(false);解決了這個問題session_cache_limiter(false); session_start();之前session_start();

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM