Web Socket support in Node.js/Socket.io for older browser

前端 未结 1 527
野的像风
野的像风 2021-01-02 21:23

I have created a Web Socket server using c++.As we know that HTML 5 support Web Socket and we have standard Web Socket Java Script Api to communicate with web socket server.

相关标签:
1条回答
  • 2021-01-02 22:11

    You can support those browsers with Socket.io, yes, but not specifically with web sockets (as many of those browsers versions don't have web sockets).

    As of November 2013, Socket.io's list of supported browsers was:

    Desktop:

    • Internet Explorer 5.5+
    • Safari 3+
    • Google Chrome 4+
    • Firefox 3+
    • Opera 10.61+

    Mobile:

    • iPhone Safari
    • iPad Safari
    • Android WebKit
    • WebOs WebKit

    They achieve this level of support by using a variety of transports, depending on what the browser is capable of (again, from November 2013):

    • WebSocket
    • Adobe® Flash® Socket
    • AJAX long polling
    • AJAX multipart streaming
    • Forever Iframe
    • JSONP Polling

    Since then, Socket.io has been split up into (at least) Socket.io and Engine.io where the latter provides the transports. And it seems like Engine.io's list of transports has dramatically reduced:

    • polling: XHR / JSONP polling transport
    • websocket: WebSocket transport

    It seems to suggest there's still a way of doing Flash sockets as well.

    Presumably this reflects the fact that websockets are almost universally supported in modern browsers.

    0 讨论(0)
提交回复
热议问题