What is best solution to manage connection in NodeJS connected via SockJS (websocket) to be durable(do not disconnect) for some time during user reloads the page?
Can I do that with session?
SockJS, native websockets and all resources that the browser maintains are released when the user reloads (or leaves) the web page. Cache, localstorage (and friends) and cookies are notable exceptions.
If you wish to have a SockJS connection when a page is open - well, you need to establish a connection when the page is opened.
SockJS is pretty fast and apparently it works fine even if you have loads of short-lived connections.
(BTW, take a look at web workers with websockets)