As the title suggests, I found that when the tab is closed the connection to the websocket remains open as long as I am using Samsung Internet Browser (SIB), as soon as I switch to another application or exit the SIB, the connection is closed. In other bowsers I found that when the tab was closed, the connection to the websocket was also closed. Do you know how I can do it? Is there an event I can focus on? I have found that onUnLoad and onBeforeUnload are not good. Do you have any suggestions?