HTML5 Websockets Server Requirements HTML5 Websockets Server Requirements apache apache

HTML5 Websockets Server Requirements


Don't think of WebSockets as a web server plugin. WebSockets is a way to establish a (nearly) raw socket connection between a browser and something else. There is some desire on the standards committee to allow web servers to easily forward WebSocket connections to their target service, however as of v76 of the protocol the WebSockets handshake is explicitly incompatible with HTTP setup (for vague security reasons). This may change back in the future especially now that a serious security issue has been found in the v76 setup process.

Yes, the WebSockets handshake looks a lot like HTTP, so it's easy to get confused, but even when it was compatible with an HTTP Upgrade request, it was still just to enable easy forwarding by the web server, not so that the webserver could become a WebSockets server.

There is a recent security issue in WebSockets which probably means most browser makers will disable WebSockets until the next version of the protocol is ready, but apart from that WebSockets is pretty much universally support because browsers without native support can use web-socket-js which is a Flash based fallback. iOS 4.2 also has WebSockets support (although again, that may get disabled temporarily due to the security issue).

So the answers to your questions are: 1) Mu 2) Yes 3) Unlikely 4) Not defined by WebSockets 5) Yes: see web-socket-js


Is there a reliable fallback for browsers that don't support websockets?

Socket.IO seems to work well. I haven't developed with it yet myself, but I've tested apps that use it with browsers that don't support WebSockets natively.

For what it's worth, you may want to drop the HTML5 when talking about and/or researching this. WebSockets are no longer part of HTML5. If you search for information on "HTML5 WebSockets", you're more likely to find dated info.


1) No. 2) Yes.3) Who knows. And Microsoft isn't saying, as usual, but probably not.

Firefox, Chrome and Opera have all announced they will not support web sockets for now because the standard is incomplete and has security issues. It may be too early to be messing with this right now.