Socket.io: why socket.io is better then native websockets

Created on 12 Feb 2018  路  2Comments  路  Source: socketio/socket.io

these days almost all browsers support websockets

why socket.io is better?

why all popular websites use socket.io ?

where websockets do not work and socket.io works ?

Most helpful comment

Their are a lot of reasons but for starters socket.io automatically handles a backup plan if the users browser doesn't support websockets (long polling) and overall the API to use socket.io is much easier to understand and work with than regular websockets.

All 2 comments

Their are a lot of reasons but for starters socket.io automatically handles a backup plan if the users browser doesn't support websockets (long polling) and overall the API to use socket.io is much easier to understand and work with than regular websockets.

Eleven items that socket.io has that webSockets do not is described here: https://stackoverflow.com/questions/38546496/moving-from-socket-io-to-raw-websockets/38546537#38546537. Among them: detection of dead connection, auto-reconnect, rooms, middleware architecture, fallback for older browers, message based data format, etc...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kootoopas picture kootoopas  路  4Comments

stnwk picture stnwk  路  4Comments

dmuth picture dmuth  路  3Comments

karmac2015 picture karmac2015  路  3Comments

Elliot9 picture Elliot9  路  4Comments