Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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 (Monsignor) 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]
[perldigious]: Also coincidentally, I'm currently in the middle of a winter storm that has dropped 1 foot of snow and is expected to drop another. I might have to adapt this for customers/vendors who come visit and put it at the beggining of every presentation I give.
[Discipulus]: the photo was removed... Cyrano de Berjerac was not of the same idea..
[stevieb]: perldigious: video near our hq in Montreal. Here in Calgary, it's -28c... we've only got 3" of snow so far, but there are several feet in the mountains already
[perldigious]: Snowshoeing time stevieb? I need to buy a pair so I can walk my German Shepherd properly through the country.
[stevieb]: yeah, I snowshoe a fair amount in the mountains. I also use spikes similar to these very often as well
[perldigious]: Discipulus: alternate link

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2016-12-06 16:30 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (112 votes). Check out past polls.