No Cache

A

Anonymous

Guest
Hi,
My ISP provides a strong CACHE & this provides me not updating my site now & then. Briefly I can say, while I post a new page in a server I can browse it well but if I update the page then I find nothing is changed but when I go to the web server I can see the updated page but I can't browse the updated page. So that I'm viewing from my ISP's CACHE. Is there any way that I write script/function not to CACHE that file ???

If I post in wrong section then forgive me. Actually I don't know where to post this topic.
 
try putting the following code at the topmost part of your script
this should tell the "cachers" not to cache the page since its old
Code:
<?php
// Date in the past
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

// always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

// HTTP/1.1
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);

// HTTP/1.0
header("Pragma: no-cache");
?>
 
Back
Top