我想知道,它们之间是否有什么区别:
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");
假设我不需要任何缓存
对于所有从谷歌搜索中徘徊并感到迷失的人…
如果使用session,在 session_start
之前调用session_cache_limiter
直接发送报头,如果你不使用会话,因为session_cache_limiter
只与session_start
结合使用。