萬盛學電腦網

 萬盛學電腦網 >> 網絡編程 >> php編程 >> 5 行 PHP 代碼禁用 HTTP 緩存

5 行 PHP 代碼禁用 HTTP 緩存

class="area">  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");

copyright © 萬盛學電腦網 all rights reserved