I wrote the simple chat application using plain nodejs and Websocket module. Everything works fine, but if the page refreshed connection state changes to
closed and description says that
Remote peer is going away. I know that it standard code of RFC 6455, but why is my connection not updating with the page so the chat continue to work. How to handle page refreshing on client side?