Cross-browser real-time logic with Socket.IO
Older browsers don't support WebSockets. In order to provide a similar experience in these browsers, we have to use techniques such as long polling, using the Flash plugin sockets, or proprietary browser-specific options such as ActiveX in Internet Explorer.
Naturally, this is a mine field, requiring hours of browser testing and in some cases highly specific knowledge of proprietary protocols (for example, IE's Active X htmlfile object).
Socket.IO (via the engine.io
module) provides a WebSocket-like API to the server and client to create the best-case real-time experience across a wide variety of browsers, including old (IE 5.5+) and mobile (iOS Safari and Android) browsers.
Note
The engine.io
module has been logically extracted and refactored out from Socket.IO Version 0.9. The engine.io
module is different in its approach; it uses enhancement instead of degradation. In the original socket.io
, connections would fallback to the best available method...