is it possible to know when cookies expire ?

M

Mel

i need my application to goto a URL when the cookies are expired. this way i
can log them out of my system altogether

thanks
 
S

Steve Pugh

Mel said:
i need my application to goto a URL when the cookies are expired. this way i
can log them out of my system altogether

An expired cookie should no longer be stored by the browser - it will
normally be deleted. Hence your application has no way of
distinguishing between a visitor with an expired cookie and a visitor
who never had the cookie in the first place.

Steve
 
M

mbstevens

Mel said:
i need my application to goto a URL when the cookies are
expired. this way i can log them out of my system
altogether

thanks

They disappear by default when the visitor quits browser.
To last longer *you* must set an expiration date on the
cookie. Even though you set this, only the value and
name are available to read. The ";Expires=..." is read
in as a command, not as data. Obviously, if you can't
read the cookie, it is expired. However, you can put a
copy of the expire date into the value of the name/value
pair if you really find it necessary.

Remember that a lot of surfers, like myself, have their
browsers set to kill cookies (evil little roaches that
they are) on leaving the browser, no matter what the
expiration date happens to be.
 
T

Toby Inkster

Mel said:
is it possible to know when cookies expire ?

Check the back of the packet. I've found out that most packet cookies are
actually OK for about a month after the sell-by date, though freshly-baked
ones don't last much longer than a couple of days.

HTH!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top