277

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

What browsers support the WebSocket API?

Sareuon
  • 2,787
  • 3
  • 16
  • 3
  • 62
    We should try to keep these answers up to date, right? I presume that's preferable to re-asking it. – dreeves Apr 22 '10 at 22:46
  • 5
    There's a good community wiki about HTML5 websockets: http://stackoverflow.com/questions/4262543/using-html-5-websockets – Wouter Dorgelo Nov 24 '10 at 07:16
  • This entire question should be closed and deleted, it's not what Stack Overflow is for. Hit up http://caniuse.com instead. – user229044 Jan 18 '13 at 17:38
  • 1
    @meagar - I disagree. I think it should be protected as a wiki to prevent new answers, but preserve the current helpful answer. This question has over 100,000 views. – Travis J Jan 18 '13 at 17:40
  • @TravisJ Answers to this question are out of date pretty much as soon as they're posted. The answers below devolve into everything from pitching commercial products to random postings about personal favourite tutorials on websocks. This entire question could read "WEBSOCKETS: DISCUSS". It's a forum post, and it's completely off-topic for Stack Overflow. – user229044 Jan 18 '13 at 17:42
  • @meagar - Hence protection. The main answer here should remain. The other answers should be deleted because they lack quality, as you point out. If you feel so strongly about them, you should flag them for deletion. – Travis J Jan 18 '13 at 17:43
  • 1
    @TravisJ Why? The main answer is **bad**. It isn't useful if it can't be constantly updated, and that's not he kind of question Stack Overflow is for. I could run through 90% of the answers here and mark them as "not an answer". They're links to random libraries, random tutorials, random tidbits, almost all of them should be comments at best. – user229044 Jan 18 '13 at 17:43
  • 2
    We are keeping an up-to-date list of WebSocket supporting browsers on our Java WebSocket project website: http://jwebsocket.org/browsers.htm – Predrag Stojadinović Mar 22 '10 at 10:51
  • 5
    The best site for HTML5 and related functionality is http://caniuse.com – kanaka Oct 19 '10 at 22:17
  • http://caniuse.com/#feat=websockets – Colonel Panic Mar 21 '13 at 22:47
  • The question is necessary. And a comment "to closed as too localized by" - it's really a moment in time but not relevant to a small geographic area. Not at all! – Xsi Apr 15 '14 at 19:01

1 Answers1

430

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#:

In PHP:

In Python:

In C:

In Node.js:

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

Vert.x (also known as Node.x) : 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 as fallback for WebSockets

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

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

Openshift 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.

The RFC for Websockets : RFC6455

Community
  • 1
  • 1
Cbe317
  • 1,229
  • 1
  • 8
  • 9
  • 32
    +1 for keeping it up to date. Opera [will also have Websockets support](http://my.opera.com/core/blog/websockets) in 10.70. – Sasha Chedygov Oct 29 '10 at 05:27
  • Right, I think they renamed Opera 10.70 in Opera 11 http://www.opera.com/browser/next/ – Cbe317 Oct 29 '10 at 11:31
  • 3
    @Tony: IE9 does *not* support WebSockets. There's experimental support available as an add-on in [HTML5 Labs](http://html5labs.interoperabilitybridges.com/), but not shipped and ready. – Shog9 Mar 22 '11 at 20:54
  • [Webbit](http://webbitserver.org/) is an excellent Java WebSocket server that should be added to the list. – Aslak Hellesøy Oct 20 '11 at 00:06
  • Update: Chrome 16 uses hybi-17 now. – Jack Lawson Dec 06 '11 at 22:31
  • caniuse.com does not display all browsers, there is, for example, also google chrome on IOS. i have no idea if it supports websockets at all, and if, which protocols / implementations. – Michahell Jul 31 '12 at 15:57
  • IE10 will support websockets, but not IE9. – nilskp Oct 17 '12 at 15:02
  • 2
    In Go-lang websockets are in the standard library: [go.net/websocket](http://godoc.org/code.google.com/p/go.net/websocket) – naufraghi Nov 12 '13 at 10:04
  • For C#, you can WCF 4.5 (ships with VS 2013). This has built-in support for websockets now. – Simon Gillbee Apr 29 '14 at 13:39
  • Caniuse is still referenced in client part. – Cbe317 Jul 07 '14 at 17:14
  • for server side i would add uWSGI. http://uwsgi-docs.readthedocs.org/en/latest/WebSockets.html – Jiloc Oct 05 '14 at 14:16
  • also play seems to offer server side web sockets https://www.playframework.com/documentation/2.3.x/JavaWebSockets – mox601 Dec 17 '14 at 15:29
  • Excellent summary. With respect to Firefox, the following link says that RFC 6455 is supported by version 48.0 and above: https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API – Vibha Jan 31 '18 at 06:41