Socket creating multiple connection on page refresh

I’m having issues with my web server when I host my socket based web app on the cloud. But it works perfectly in my local machine, The problem is that when I refresh my page It creates another connection even though Is still one connection but in my local machine nothing like that happens. I’d appreciate any help that I can get. Thanks

isn’t that normal for the browser to close connections when you leave a page by refreshing it? how did you get it to continue using the websocket from the last page with a local app?