J
Jason
I am creating a Comet/Ajax chatroom system. When people go to the page,
it will add them to the list of people in the room via window.onload.
When they leave, disconnect, go to another page, or close browser, I
need to remove them from the room.
I use window.onbeforeunload, but it seems it doesn't always fire. IE &
firefox will only unload sometimes - sometimes I think maybe its
caching the page, and not calling onbeforeunload (my guess)? It also
doesn't get fired when the user closes the browser. Anyhow, does anyone
know how to detect with accuracy whether someone left the page,
disconnected, or closed the browser? I can't seem to rely on
window.onbeforeunload...
- Jason
it will add them to the list of people in the room via window.onload.
When they leave, disconnect, go to another page, or close browser, I
need to remove them from the room.
I use window.onbeforeunload, but it seems it doesn't always fire. IE &
firefox will only unload sometimes - sometimes I think maybe its
caching the page, and not calling onbeforeunload (my guess)? It also
doesn't get fired when the user closes the browser. Anyhow, does anyone
know how to detect with accuracy whether someone left the page,
disconnected, or closed the browser? I can't seem to rely on
window.onbeforeunload...
- Jason