That was my suspicion. I understand that beforeunload is more reliable
than unload, but the problem is that the only way to create a page
leave confirmation is through the beforeunload event. Perhaps a page
leave confirmation should be built into faye as an option? Only
display it if there is still an open connection and give us developers
a way to configure the message.
My business logic requires that chat sessions be closed on page leave,
so I'd like to make users confirm the page leave if they have a chat
open.