Discussions
chat SDK - clean-up on navigate away
9 months ago by Nick Foad
what's the recommended way of cleaning up when a user navigates away from the web page hosting the chat sdk?
i have an onunload=function() which attempts a chatEngagement.disconnect(); - the function runs but the disconnect never happens, my agent is left in a dead session.
since my onunload runs i don't hold out much hope for changing that to onbeforeunload, visibilitychange or pagehide...