Re: Keep from using cache

From: Date: Fri, 27 Aug 2004 15:10:19 +0000
Subject: Re: Keep from using cache
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-194938@lists.php.net to get a copy of this message
> > Here's the problem... > > After a deletion, when the question list page is reloaded, the browser uses > > the cached version of the page and the question which was just deleted is > > still displayed. If you refresh the page, the question disappears. So, I > > know that the deletion is working. I just need to know how to force the > > browser to NOT use the cached version of the page. > > try these > > header("Cache-Control: private"); > header("Pragma: no-cache"); There are some bugs in IE5 which require the use of a few extra cache headers, for good measure. For data which I don't want cached, I use this: header('Cache-Control: no-cache, must-revalidate'); // HTTP/1.1 header('Cache-Control: post-check=0, pre-check=0'); // damnable IE5 header('Expires: Wed, 16 Nov 1977 10:00:00 CET'); // date in past header('Last-Modified: '.date('r')); // right -now- header('Pragma: no-cache'); // HTTP/1.0 --------------------------------------------------------------------- michal migurski- contact info and pgp key: sf/ca http://mike.teczno.com/contact.html

« previous php.general (#194938) next »