I have a real time application which used WebSockets between java spring server and browser. Is there a method to keep the Websocket connection alive after page refresh ?
This is my javascript code:
consumerWebSocket = new WebSocket("wss://" + window.location.host +
"/myWebSocketConnection");
consumerWebSocket.onopen = function () {
sendThroughWS(consumerWebSocket, "Send this message from browser to server");
};