IE and Socket.io Compatibility

I am doing a chat example, for example here: http://psitsmike.com/2011/09/node-js-and-socket-io-chat-tutorial/

When I use Chrome and Firefox, everything works like a charm. In IE9 or Opera, some socket.io events do not fire (for example, turn off) or do not fire too late, and receiving data is too slow.

I installed node.js and the socket.io module using the npm method.

Please, help.

+6
source share
1 answer

Socket.IO works best with websockets. Until 2012, most browsers did not support websockets ( source ).

In such browsers, socket.io returns to various polling methods, but this can lead to problems that you experience, for example, low data transfer rates and delays (a 1-2 minute firing). To fix this, you should try to enable flash sockets.

io.set('transports', [ 'websocket' , 'flashsocket' , 'htmlfile' , 'xhr-polling' , 'jsonp-polling' ]); 

Also, verify that the flash policy port (default 10843) is accessible to the client.

+8
source

All Articles