我正在使用此代码在php中禁用缓存,但此代码无法在任何浏览器上运行。请有人帮助我,我不想在缓存中保存php网页
header('cache-control: no-cache,no-store,must-revalidate');
header('pragma: no-cache');
header('expires: 0');
答案 0 :(得分:0)
header("Expires: Tue, 03 Jul 2001 06:00:00 GMT"); // Read (1)
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
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");