5行PHP代码禁用HTTP 缓存(转)

转载自 php100

header("Content-Type: application/json");  //这个要看具体的输出形式 header('Content-Type: text/html; charset=utf-8');header("Content-type:application/pdf");
header("Expires: 0");           
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");

Related posts:

Leave a Reply

Your email address will not be published.