Re: end session when the browser window is closed.



My personal preference is to not tied clean up to the normal application
flow. I tend to prefer to have a dedicated clean up routine that cleans
whatever needs to be cleaned.

You could use onbeforeclose but it's likely you'll find cases where it
doesn't fire (such as crashed browser etc...) plus session_end don't work
for other session providers etc...

Patrice

--

"sun" <sun@xxxxxxxxxxxxxxxxxxxxxxxxx> a écrit dans le message de
news:5E6B52AE-BD80-4C84-8E72-E351A2AFBDB0@xxxxxxxxxxxxxxxx
> I want to do clean up routine to my database when the browser is closed.
I
> have my code in session-end - but it never fires when the browser closes.
I
> cant do onbeforeunload as it will be fired each time when the browser
posts
> back.
> Somehow I want to capture browser close event and fire session abandon
which
> will call session end. Please help.
> Thanks,
> Sun


.



Relevant Pages

  • Managing two sessions in different browsers at one time
    ... I need to be able to open another browser from within an already opened ... browser with a completely new session (using the same session ... Is there a clean way to do this? ... Steve ...
    (alt.php)
  • Managing two sessions in different browsers at one time
    ... I need to be able to open another browser from within an already opened ... browser with a completely new session (using the same session ... Is there a clean way to do this? ... Steve ...
    (comp.lang.php)
  • Re: Trojan Horses Popular To The Malicious Hackers
    ... >has a decent AV program running. ... >browser JS, ActiveX, etc., only accepts emails from trusted ... Our mark has also taken the time to ... So we have a relatively clean OS connected to the net 24/7. ...
    (comp.security.misc)
  • Re: Trojan Horses Popular To The Malicious Hackers
    ... >has a decent AV program running. ... >browser JS, ActiveX, etc., only accepts emails from trusted ... Our mark has also taken the time to ... So we have a relatively clean OS connected to the net 24/7. ...
    (comp.security.firewalls)
  • Re: Trojan Horses Popular To The Malicious Hackers
    ... >has a decent AV program running. ... >browser JS, ActiveX, etc., only accepts emails from trusted ... Our mark has also taken the time to ... So we have a relatively clean OS connected to the net 24/7. ...
    (microsoft.public.security)