At 09:45 AM 2/12/02 -0500, Bob Showalter wrote:

> > I made a counter in Perl and if a visitor refreshes the page,
> > the counter
> > increases.
> > Can I modify the Perl script so that won't happend?
>
>Give him a cookie that expires after a while (a day maybe?).
>If he sends the cookie, don't increment your counter.
>Of course, if he refuses your cookie, this won't work.

Why even put an expiration on the cookie? If there is no expiration date 
than it's a session cookie so it only lasts as long as the browser is 
active. You may also want to set the page url on the cookie otherwise if 
they click to another page your counter won't increment... see what I mean?

hth,

Marty

SIMPL(tm) Content Management & WebSite Creation
http://face2interface.com/Home/Demo.shtml
Complementary Color Picker
http://face2interface.com/WebSafe


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to