5 行 PHP 代码禁用 HTTP 缓存

2012-9-7 杜世伟 Php

<?
    header("Content-Type: application/json");

 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");
 ?>

标签: PHP http

Powered by emlog 沪ICP备2023034538号-1