[英]PHP - Difference between session_cache_limiter() and headers?
I was wondering, if there is any difference between them: 我想知道它们之间是否有任何区别:
session_cache_limiter('nocache');
and headers: 和标题:
header("Cache-Control:no-store,no-cache,must-revalidate,max-age=0");
header("Cache-Control:post-check=0,pre-check=0",false);
header("Pragma:no-cache");
Assuming that I don't want any cache. 假设我不需要任何缓存。
For all who wandered here from google search and feel lost ... 对于所有从Google搜索徘徊到这里并感到迷路的人...
Call session_cache_limiter
before session_start
if you use session. 呼叫session_cache_limiter
之前 session_start
如果你用会话。
Send headers directly, if you don't use session, because session_cache_limiter
only works in combination with session_start
. 如果不使用会话,则直接发送标头,因为session_cache_limiter
仅与session_start
结合使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.