Which transports are supported?

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:

  • WebSockets*
  • XHR streaming
  • XHR polling
  • JSONP polling
 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.
*Popular browsers support WebSockets in full since the versions listed on caniuse.com/websockets