Why should I use Socket.io?

I am learning Node.js and currently learning WebSockets. As far as I understand, Socket.io was designed to eliminate the inconsistent support that various browsers had with WebSockets ... If you look at caniuse WebSockets , it looks like WebSockets currently has almost full support. Can someone explain why I should use Socket.io and WebSockets in this case?

+7
source share
1 answer
  • It handles graceful degradation for you with numerous technical alternatives to get bidirectional time streaming (web sockets, ajax long polling, flash, etc.).
    • As of March 2013, this site lists web sockets with 61% support. This is not "almost complete."
  • It handles browser inconsistencies and various support levels for you.
    • (these first 2 things basically have the same meaning created by jQuery to introduce it in perspective).
  • It includes additional features beyond open web sockets, such as number support for the basic publishing / subscribing infrastructure and things like automatic reconnection.
  • AFAIK is more popular and easier to get help than vanilla web sockets, at least for now.

However, just like VanillaJS for jQuery haters, if you prefer to use the standard web socket APIs directly, be sure to beat yourself out.

+9
source

All Articles