Node.js web application browser compatibility

I heard that node.js is the ideal environment for creating real-time web applications (chats, live broadcasts, etc.), then I assume that this is due to the large number of io connection socket between the nodes and the client browser.

on the client side, I need to use websocket (html5) to communicate with node.js, if so, then most older browsers do not support HTML5-Websocket.

Question: Real-time web applications created using node.js will only work with HTML5 compatible browsers.?

+6
source share
2 answers

Many chatjs chat applications use socket.io .

socket.io has a backup (including pulling or flash) for browsers that do not have web sites:

Socket.IO aims to make real-time applications possible in every browser and mobile device, blurring the differences between different transport mechanisms. It is without real-time help 100% in JavaScript.

The point of using socket.io is that you don't care, you just use it, and most browsers will use the websites, and some won't (but they will still work as best as possible).

+10
source

I heard that node.js is the ideal environment for creating real-time web applications (chat, live> feeds, etc.), then I assume that this is due to the large amount of io connection socket between nodes and client> browser .

Yes, what you heard is true. This is due to socket.io connecting between the client browser and the server.

Read more about socket.io here

on the client side, I need to use websocket (html5) to communicate with node.js, if so, then most of the old browser does not support HTML5-Websocket.

The socket.io Node JS package creates an internal WebSocket connection if the client uses an HTML5-enabled browser. In other browsers, it will gracefully move to different transport mechanisms.

Question: Real-time web applications created using node.js will only work with compatible HTML5 browsers.?

It should be clear over the comments that it will work in all supported browsers if you use socket.io :) See Browser Support for socket.io

+1
source

All Articles