What browsers support HTML5 WebSocket API?

JavascriptWeb ApplicationsHtmlNetwork ProgrammingWebsocket

Javascript Problem Overview


I am going to develop an instant messaging application that runs in the browser.

What browsers support the WebSocket API?

Javascript Solutions


Solution 1 - Javascript

Client side

  • Hixie-75:
  • Chrome 4.0 + 5.0
  • Safari 5.0.0
  • HyBi-00/Hixie-76:
  • Chrome 6.0 - 13.0
  • Safari 5.0.2 + 5.1
  • iOS 4.2 + iOS 5
  • Firefox 4.0 - support for WebSockets disabled. To enable it see here.
  • Opera 11 - with support disabled. To enable it see here.
  • HyBi-07+:
  • Chrome 14.0
  • Firefox 6.0 - prefixed: MozWebSocket
  • IE 9 - via downloadable Silverlight extension
  • HyBi-10:
  • Chrome 14.0 + 15.0
  • Firefox 7.0 + 8.0 + 9.0 + 10.0 - prefixed: MozWebSocket
  • IE 10 (from Windows 8 developer preview)
  • HyBi-17/RFC 6455
  • Chrome 16
  • Firefox 11
  • Opera 12.10 / Opera Mobile 12.1

Any browser with Flash can support WebSocket using the web-socket-js shim/polyfill.

See caniuse for the current status of WebSockets support in desktop and mobile browsers.

See the test reports from the WS testsuite included in Autobahn WebSockets for feature/protocol conformance tests.


Server side

It depends on which language you use.

In Java/Java EE:

Some other Java implementations:

In C#:

  • [XSockets.NET][29]
  • [SuperWebSocket][30]
  • [Nugget][31]
  • [Alchemy-Websockets][32]
  • [Fleck][33]
  • [SignalR] [34]

In PHP:

  • [Ratchet][35]
  • [phpwebsocket][36].
  • [Extendible Web Socket Server][37]
  • [phpdaemon][38]

In Python:

  • [pywebsockets][39]
  • [websockify][40]
  • [gevent-websocket][41], [gevent-socketio][42] and [flask-sockets][56] based on the former
  • [Autobahn][43]
  • [Tornado][44]

In C:

  • [libwebsockets][45]

In Node.js:

  • [Socket.io][46] : Socket.io also has serverside ports for Python, Java, Google GO, Rack
  • [sockjs][47] : sockjs also has serverside ports for Python, Java, Erlang and Lua
  • [WebSocket-Node][48] - Pure JavaScript Client & Server implementation of HyBi-10.

[Vert.x (also known as Node.x)][49] : A node like polyglot implementation running on a Java 7 JVM and based on Netty with :

  • Support for Ruby(JRuby), Java, Groovy, Javascript(Rhino/Nashorn), Scala, ...
  • True threading. (unlike Node.js)
  • Understands multiple network protocols out of the box including: TCP, SSL, UDP, HTTP, HTTPS, Websockets, [SockJS][50] as fallback for WebSockets

[Pusher.com][51] is a Websocket cloud service accessible through a REST API.

[DotCloud][52] cloud platform supports Websockets, and Java (Jetty Servlet Container), NodeJS, Python, Ruby, PHP and Perl programming languages.

[Openshift][53] cloud platform supports websockets, and Java (Jboss, Spring, Tomcat & Vertx), PHP (ZendServer & CodeIgniter), Ruby (ROR), Node.js, Python (Django & Flask) plateforms.

For other language implementations, [see the Wikipedia article for more information][54].

The RFC for Websockets : [RFC6455][55]

[25]: http://grizzly.java.net/ "Grizzly" [26]: http://activemq.apache.org/ [27]: http://camel.apache.org/ [28]: http://www.jboss.org/hornetq/ [29]: http://xsockets.net [30]: http://superwebsocket.codeplex.com/ [31]: http://nugget.codeplex.com/ [32]: https://github.com/Olivine-Labs/Alchemy-Websockets [33]: https://github.com/statianzo/Fleck [34]: http://signalr.net/ [35]: http://socketo.me/ [36]: https://github.com/GeorgeNava/phpwebsocket [37]: https://github.com/wkjagt/Extendible-Web-Socket-Server [38]: https://github.com/kakserpom/phpdaemon [39]: http://code.google.com/p/pywebsocket/ [40]: https://github.com/kanaka/websockify [41]: http://pypi.python.org/pypi/gevent-websocket/ [42]: https://bitbucket.org/Jeffrey/gevent-socketio/src [43]: http://autobahn.ws [44]: http://www.tornadoweb.org [45]: http://git.warmcat.com/cgi-bin/cgit/libwebsockets/ [46]: http://socket.io/ [47]: http://sockjs.org [48]: https://github.com/Worlize/WebSocket-Node [49]: http://vertx.io/docs/ [50]: https://github.com/sockjs/sockjs-client#readme [51]: http://pusher.com/ [52]: https://www.dotcloud.com/ [53]: https://openshift.redhat.com/app/ [54]: http://en.wikipedia.org/wiki/Web_Sockets [55]: https://www.rfc-editor.org/rfc/rfc6455 [56]: http://kennethreitz.org/introducing-flask-sockets/ [57]: http://tomcat.apache.org/tomcat-8.0-doc/web-socket-howto.html

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSareuonView Question on Stackoverflow
Solution 1 - JavascriptCbe317View Answer on Stackoverflow