Skip to content

Instantly share code, notes, and snippets.

@agborkowski
Created August 13, 2012 08:18
Show Gist options
  • Save agborkowski/3338134 to your computer and use it in GitHub Desktop.
Save agborkowski/3338134 to your computer and use it in GitHub Desktop.
php::http::force cache off
<?php
//@link http://www.paulund.co.uk/disable-http-cache-with-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");
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment