我想知道,它们之间是否有什么不同:
session_cache_limiter('nocache');
和标头:
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");
假设我不想要任何缓存。
发布于 2018-08-15 05:35:51
对于所有从谷歌搜索中走来并感到迷失的人……
如果您使用session,则在 session_start
之前调用session_cache_limiter
。
如果不使用会话,则直接发送标头,因为session_cache_limiter
只能与session_start
结合使用。
https://stackoverflow.com/questions/30572934
复制相似问题