Socket.IO Transport Browser Compatibility
Real Time Web
Sunday, 22 August 2010 20:54

Socket.IO seems to have some issues with a few of it's transports. The idea behind the transports is that the browser is supposed to attempt to each and failover to the next until it finds one that works. What I am observing is that there are a couple transports that actually cause the connection to fail, and no failover takes place. Unfortunately, one of these transports is WebSocket, which is most efficient transport in the list. So, here is the list on transports I use, with helpful notes, to make sure that everything will work on most major browsers:

transports: [
  //'websocket', //breaks chrome5, should be preferred :(
  'server-events', //i assume used in Opera, never seen it used
  //'flashsocket', //breaks android 2.1, chrome5
  'htmlfile', //preferred in IE8
  'xhr-multipart', //not supported on android 2.1, chrome5, preferred in FF3.6
  'xhr-polling' //preferred in chrome5, android 2.1, iPhone
]

Here's the setup that I did my tests against:

  • Socket.IO version: 0.5.3
  • OS: Ubuntu 10.04
  • Browsers Tested:
    • IE8
    • Firefox 3.6
    • Chrome 5
    • Andoird 2.1
    • iPod Touch

blog comments powered by Disqus