Why is Socket.io connection slow on Safari and Chrome
node.js, socket.io
Solution
You can reduce the timeout used for the first websocket connection using the "connect timeout" parameter (which is 10 seconds by default).
You can try reducing the timeout to 1 second using:
io.connect('http://myapp.heroku.com/',{'connect timeout': 1000});
Problem
I am real newbie with Node.js and Socket.io - so please bear with me if this is a silly question. I set up a very basic dummy on Heroku to test out Socket.io. All you can do is click a button and all connected browser see a message accordingly. This worked very well when the server was running locally. Now with it being on Heroku I see connection problems on Safari and Chrome. The initial connection is delayed for about 10 seconds, and I get a error 503 on the first call of `io.connect('http://myapp.heroku.com/')`. Things work well with a pretty much immediate connection in Firefox and Internet Explorer. You can see the app in action here: http://sprain.ch/socketio/ Any ideas on what might cause this problem and how to fix it?