I am playing around with HTML5 WebSockets. I was wondering, how do I close the connection gracefully? Like, what happens if user refreshes the page, or just closes the brows
Very simple, you close it :)
var myWebSocket = new WebSocket("ws://example.org"); myWebSocket.send("Hello Web Sockets!"); myWebSocket.close();
Did you check also the following site And check the introduction article of Opera