Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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
Re^2: delete cookies when browser window closed
by afoken (Parson) 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.

    Alexander

    --
    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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2014-09-19 04:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (129 votes), past polls