I have a web site in which I'd like to have a user system where the user is logged in no matter where he is on the web site.
Using socket.io, I found that each HTML page requires its own socket.io connection. So every time a user leaves one HTML page for another, he will disconnect the first socket and connect the other.
What is the best way to preserve such a connection? I don't want the user to manually log in on every HTML page. I'd assume that passing the login data as HTML parameters and automatically log in to the server with those parameters is extremely dumb, but currently it is the only solution I can think of.
Ideally, socket.io would use the same socket on the entire site.
I assume that I'm missing something though, considering that all websites with a user system has the desired functionality.