Node.js / Server.js socket implementation problems Node.js / Server.js socket implementation problems node.js node.js

Node.js / Server.js socket implementation problems


From what I've read it seems that the problem on IE8 might be related to flash. It IE8 uses flashsocket as the default configuration. I suggest to try the following on the client side:

 if(navigator.appName.indexOf("Internet Explorer")!=-1 && navigator.appVersion.indexOf("MSIE 8")==-1 ){            socket = io.connect("http://www.sampledomain.com:8000", {           transports: ['xhr-polling']      }); } else {       socket = io.connect("http://www.sampledomain.com:8000" ); }

This should make IE8 use long polling while all other machines use the best method they can.

On a side note: You might also want to consider incrementing the "serving" variable on the server.


Find existing issue Causes a "Stack Overflow" in IE8 when using xhr-polling #385.

This was fixed by disabling Flash.

Also find Safari over windows client use xhr-polling instead of websocket - performance are severely harm #1147. While this is Safari it may apply to IE8 because it is using similar mechanism.

I did a small test using your socket.io but in IE 10 and emulated IE8 so that I could debug well. Started capturing Network in the tab and noticed the requests logging every few seconds.Left alone for few minutes and I see a lot of requests logged in. You will not see this in Chrome because it has true WebSockets. While IE8 does not support WebSockets socket.io emulate that using plain HTTP GET/POST using some mechanism. So my theory is that even if socket.io works with IE8 it does not reliably emulate web sockets

My advice is to rule out IE 8 for long running client application. IE8 is no longer supported by Microsoft.


maybe try to replace

""+String("00" + receivedServing).slice(-2)

with

('00' + receivedServing).slice(-2)