Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: delete cookies when browser window closed

by pajout (Curate)
on Jul 28, 2010 at 07:32 UTC ( #851672=note: print w/replies, xml ) Need Help??

in reply to delete cookies when browser window closed

What about setting cookie with expiration in the past on unload event?
  • Comment on Re: delete cookies when browser window closed

Replies are listed 'Best First'.
Re^2: delete cookies when browser window closed
by afoken (Abbot) on Jul 28, 2010 at 21:39 UTC

    No Javascript, no event handler, no deleted cookie. Plus unload event handlers are not very reliable. Leaving out the expiration date just works (even with killall -9 $browsername), no need for Javascript.


    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

      I agree, afoken, but the onunload stuff I thought should be pretty good... it's included in most core libs (basically because of IE6's memory leak... you had to manually unload everything or as the user went from page to page, IE6 would get full and puke). Hm, though that's usually all IE-only code...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://851672]
[Corion]: Hi choroba, LanX!
[Corion]: LanX: Turn that frown upside down! ;)
[Eily]: hello people!
[choroba]: a bit early for harvest mite, isn't it?

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2018-05-23 07:39 GMT
Find Nodes?
    Voting Booth?