Showing posts with label disable proxy server cache. Show all posts
Showing posts with label disable proxy server cache. Show all posts

Wednesday, April 29, 2009

PHP - How to prevent/disable caching by proxy server

Add the following code into the very top of your php script.


header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s", time() + 300) . " GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");


Hope this help :)