Posted By

ryantxr on 06/11/12


Tagged

http php header cache


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

a8ball


No Cache HTTP Headers


 / Published in: PHP
 

HTTP headers to disable caching.

  1. header("Content-Type: application/json");
  2. header("Expires: 0");
  3. header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
  4. header("Cache-Control: no-store, no-cache, must-revalidate");
  5. header("Cache-Control: post-check=0, pre-check=0", false);
  6. header("Pragma: no-cache");

Report this snippet  

You need to login to post a comment.