How does gatewayWorker jump to open connections in the same window in a browser?

recently, I am doing a page version of the chat room. Every time the front end refreshes the page, I have to reconnect to the background. I feel that this is a waste of resources. I want to control the continuous connection when I jump under the same window. Is there anything we can do?
public static function onConnect ($client_id)
{

//

}

Jul.19,2021

refreshing the browser will destroy all resources on the current page, and the connection must be disconnected. This is the mechanism of the browser. The code cannot control


the front end uses vue to find out.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2b9f4-2ae11.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2b9f4-2ae11.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?