Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: html and cookie expiration

by bart (Canon)
on May 05, 2003 at 13:17 UTC ( #255611=note: print w/replies, xml ) Need Help??


in reply to html and cookie expiration

Completely off-topic, but it could be handy to have a small checklist on cookies. After all, this is what you explicitely asked for:
  • To change the value for a cookie, send out a cookie with the same name and path, and with the new value
  • You can pass it an expiration date, at what time the browser will forget about the cookie. If you don't, the cookie will expire as soon as the browser is closed.
  • To delete a cookie, send out a cookie with the same name and path, with any value you like, and with the expiration date somewhere in the past.
If you find you can't get rid of a cookie, it's likely that that cookie got set with a different path. There's no way on the server side, to figure out what path a cookie was set valid for. In fact, if you set a cookie with the same name for a different path, you'll end up with two cookies of the same name. It could be you only see the last cookie sent, depending on what cookie library you use. I don't think there are any rules on what order the browser will send them to the server, so I would never rely on it.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://255611]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2023-02-07 04:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (38 votes). Check out past polls.

    Notices?