Search code examples
internet-explorer-7socket.iocompatibility

socket.io compatibility issue with IE7


It seems that many people get socket.io working with IE7, but not me... I have done some experiments with socket.io v0.9.16:

  1. with jsonp-polling:

    client running on IE7 can connect the server, receive first message but not send/emit

  2. with xhr-polling:

    IE7 can connect the server, but cannot receive or send/emit messages.

  3. with htmlfile:

    even worse, no connection can be established.

I have Apache web server listening on port 80 and socket.io listening on port 8080. Could anyone tell me how to get IE7, IE8 talk to socket.io server correctly? Tons of thanks in ahead.


Solution

  • it turns out that there is a console.log() call in my js code, which is not supported in IE7. IE7 (its js thread) silently dies, no warning no prompt.

    With console.log() removed, everything works fine. so, watch out for such issues that can waste a lot of time