Our Javascript browser library will always choose the best transport available based on the browser and connection available.  The client library prioritises transports in this order:



When a browser client library first connects to Ably to establish a realtime connection:

  • By default the library initiates connection using an HTTP-based transport. It chooses the best available of those supported by the browser, in descending order of priority: xhr streaming, xhr polling, jsonp polling.
  • A WebSocket connection is then attempted, on those browsers that support it. When that connection succeeds, the library seamlessly migrates to the new connection.

Note the following popular browsers support WebSockets in full since the version listed, see caniuse.com/websockets:
  • Internet Explorer 10 (released 2012)
  • Internet Explorer for Mobile 10 (released 2012)
  • Microsoft Edge (released 2015)
  • Firefox 11 (released 2012)
  • Firefox for Android 18 (released 2013)
  • Chrome 16 (released 2011)
  • Chrome for Android 18 (released 2012)
  • Safari 7 (released 2013)
  • iOS Safari (released 2012)
  • Opera 12 (released 2012)
  • Opera Mobile 12 (released 2012)
  • Android browser 4.4 (released 2013)
  • Blackberry Browser 7 (released 2013)

* Opera Mini, as of Nov 2015, still does not support WebSockets and as such will fallback to XHR streaming by default.  It appears to have been superseded by Opera Mobile.