By Sareuon


2009-08-10 08:19:53 8 Comments

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

What browsers support the WebSocket API?

1 comments

@Cbe317 2010-04-23 17:26:10

Client side

  • Hixie-75:
    • Chrome 4.0 + 5.0
    • Safari 5.0.0
  • HyBi-00/Hixie-76:
  • HyBi-07+:
  • 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, Grovy, 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

@Sasha Chedygov 2010-10-29 05:27:20

+1 for keeping it up to date. Opera will also have Websockets support in 10.70.

@Cbe317 2010-10-29 11:31:01

Right, I think they renamed Opera 10.70 in Opera 11 opera.com/browser/next

@Shog9 2011-03-22 20:54:20

@Tony: IE9 does not support WebSockets. There's experimental support available as an add-on in HTML5 Labs, but not shipped and ready.

@Jens Roland 2011-06-15 18:26:55

Excellent writeup. Thanks!

@Aslak Hellesøy 2011-10-20 00:06:18

Webbit is an excellent Java WebSocket server that should be added to the list.

@Jack Lawson 2011-12-06 22:31:34

Update: Chrome 16 uses hybi-17 now.

@Michael Trouw 2012-07-31 15:57:29

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.

@nilskp 2012-10-17 15:02:43

IE10 will support websockets, but not IE9.

@naufraghi 2013-11-12 10:04:19

In Go-lang websockets are in the standard library: go.net/websocket

@Simon Gillbee 2014-04-29 13:39:15

For C#, you can WCF 4.5 (ships with VS 2013). This has built-in support for websockets now.

@Cbe317 2014-07-07 17:14:19

Caniuse is still referenced in client part.

@Jiloc 2014-10-05 14:16:09

for server side i would add uWSGI. uwsgi-docs.readthedocs.org/en/latest/WebSockets.html

@mox601 2014-12-17 15:29:50

also play seems to offer server side web sockets playframework.com/documentation/2.3.x/JavaWebSockets

@Vibha 2018-01-31 06:41:03

Excellent summary. With respect to Firefox, the following link says that RFC 6455 is supported by version 48.0 and above: developer.mozilla.org/en-US/docs/Web/API/WebSockets_API

Related Questions

Sponsored Content

27 Answered Questions

[SOLVED] What does "use strict" do in JavaScript, and what is the reasoning behind it?

52 Answered Questions

[SOLVED] What is the best way to detect a mobile device?

69 Answered Questions

[SOLVED] What is the most efficient way to deep clone an object in JavaScript?

19 Answered Questions

[SOLVED] Storing Objects in HTML5 localStorage

36 Answered Questions

[SOLVED] What is the !! (not not) operator in JavaScript?

  • 2009-04-24 08:13:58
  • Hexagon Theory
  • 507940 View
  • 2913 Score
  • 36 Answer
  • Tags:   javascript operators

21 Answered Questions

[SOLVED] What is the difference between call and apply?

35 Answered Questions

[SOLVED] Change an HTML5 input's placeholder color with CSS

7 Answered Questions

[SOLVED] WebSockets vs. Server-Sent events/EventSource

17 Answered Questions

[SOLVED] How to decide when to use Node.js?

Sponsored Content