The integration of nodejs and websocket over the past two days makes it impossible for the client to communicate with the server. In different browsers, the performance is different,
Firefox (V6)
If you write var Ws = new websocket (URL) like this, firebug will directly report a websockect not defined error. After investigation, in Firefox, the class of websockect is called websocket.
Chrome (V15)
Websocket can be created normally, but close as soon as the data is received. This problem happened to me for two days. It was found that many people on Google forums had this problem. This is obviously a bug.
Safari (V5)
This guy currently looks very good at websocket support. Finally, it is accessible in this browser.
IE
I didn't try it. I heard that ie10 is required for official support.
To sum up, websocket is still a new thing, at least most mainstream browsers do not support it. So I think we still need to wait.