Keep socket connection when new page is loaded
问题 I have a small project with socket.io and node.js. Basically the landing page (index.html) is a waiting room for players, who can agree to play with each other. In that case, I want to redirect them to a different html (game.html, which is in the same folder as index.html). I want to keep the socket connection, since during the game there has to be communication with the server. I have tried two ways, but both fail. In each case, I change the client-side window.location (as described here). 1