Re: About "no-cache"

From: Date: Fri, 24 Aug 2001 07:25:33 +0000
Subject: Re: About "no-cache"
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-9034@lists.php.net to get a copy of this message
Hi. Do you really think preventing the browser from caching the page is what you need here? I think no. Whenever the page is shown/reloaded you need to check if the user already has been "counted". This may be done by setting some information in a cookie (you mentioned one). The code for your counter just has to get that information and increase when not set. Or did I get something wrong? MfG Maar ---------------------------------------- Matthias Maar Lehrstuhl für Informatik I Universität Würzburg Am Hubland D-97074 Würzburg Germany Tel.: ++49 (0) 931/888-4941 Fax: ++49 (0) 931/888-4600 http://www1.informatik.uni-wuerzburg.de "Science" <mscience88@us.sina.com> schrieb im Newsbeitrag news:20010821193135.58229.qmail@pb1.pair.com... > Hi all, > I am using cookie to write a counting page but when the page is refreshed, > it will increase by 1 automatically. > According to this problem, I used following lines but it doesn't work > -------------------------------------------------------------------------- -- > -- > header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); > header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); > header ("Cache-Control: no-cache, must-revalidate"); > header ("Pragma: no-cache"); > -------------------------------------------------------------------------- -- > --- > even I used html script > <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> > <META HTTP-EQUIV="Expires" CONTENT="-1"> > > Well, Is there anyone who knows how to prevent the page to be cached? > > Thanks a lot > >

« previous php.windows (#9034) next »