Jenan
Jenan

Reputation: 3320

Socket.io - slow connection

I use node.js and socket.io.

I am using the latest version socket.io.

I have a problem with connection in socket.io.

In Internet Explorer and Opera connection lasts seven seconds.

In firefox and chrome connection is good.

I use transports:

io.configure(function () {
  io.set('transports', ['websocket','flashsocket','xhr-polling']);
});

How to speed up the connection socket.io?

Upvotes: 0

Views: 3444

Answers (1)

freakish
freakish

Reputation: 56557

You should realize that under FF and Chrome the socket.io module works fine, because they use (the best of the best) WebSockets. Both IE and Opera did not implement the specification yet.

So instead socket.io tries to emulate flashsocket or xhr-polling under them which most of the time works badly. At least from my experience it never worked well, even though I implemented it in a bit important website with many people thinking on this topic.

So I guess you'll have to stick to what you have at the moment and wait until HTML5 will be fully operational on all browsers.

Upvotes: 3

Related Questions