Re: About "no-cache"
| From: | science | Date: | Sun, 26 Aug 2001 16:57:26 +0000 |
| Subject: | Re: About "no-cache" | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-9070@lists.php.net to get a copy of this message | ||
Hi,
Well, I didn't write the counting number into the cookie. For example: I
use "if(isset$test)" so when I reload the page the variable $test is still
set so that it will count again. I wonder if there is any ways to prevent
this situation?
Thanks
DP
"Matthias Maar" <maar@informatik.uni-wuerzburg.de> ¼¶¼g©ó¶l¥ó
news:20010824082753.29953.qmail@pb1.pair.com...
> 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
> >
> >
>
>