Sark
Sark

Reputation: 4546

Node.js web application browser compatibility

I heard node.js is an ideal framework for building real time web application (chatting, live feeds etc...), then i guess it involve lot of socket io connection between nodejs and client browser.

in client side do i have to use websocket(html5) in order to communicate with node.js, if that is the case, then most of the older browser won't support HTML5-Websocket.

Question : are real time web applications built using node.js will work only with HTML5 compatible browsers.?

Upvotes: 6

Views: 11092

Answers (2)

Denys Séguret
Denys Séguret

Reputation: 382092

Many nodejs chat applications use socket.io.

socket.io has a fallback (involving pulling or Flash) for browsers not having websockets :

Socket.IO aims to make realtime apps possible in every browser and mobile device, blurring the differences between the different transport mechanisms. It's care-free realtime 100% in JavaScript.

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

Upvotes: 10

Manu
Manu

Reputation: 901

I heard node.js is an ideal framework for building real time web application (chatting, live >feeds etc...), then i guess it involve lot of socket io connection between nodejs and client >browser.

Yes, what you have heard is correct. It does involve a socket.io connection between client browser and the server

Read more about socket.io here

in client side do i have to use websocket(html5) in order to communicate with node.js, if >that is the case, then most of the older browser won't support HTML5-Websocket.

socket.io package of Node JS creates a WebSocket connection internally, if the client is using HTML5 enabled browser. In other browsers, it will fall back gracefully to different transport mechanisms.

Question : are real time web applications built using node.js will work only with HTML5 >compatible browsers.?

Above comments must have made clear, it will work in all supported browsers, if you use socket.io :) See Browser support for socket.io

Upvotes: 1

Related Questions