Websocket transport doesn't work on my Firefox/Chrome (Windows version)

I'm using the lastest stable version of Firefox/Chrome on Windows to test my application (use socket.io). But the websocket transport doesn't work, in browser console it sent message that shows it supports Websocket, xhr-polling... but it doesn't work then fallback to use others (about 10s later).

I bring the source code to run on Ubuntu (in a VM) and test with Firefox/Chrome on Unbuntu, it works well with websocket instantly. Then I try to use Windows version of 2 browsers to test with server on Ubuntu, websocket doesn't work (the same as server on Windows) then fallback. So I think the problems are my Windows or Firefox/Chrome on it.

I don't know why: Does it happen to others computer using Windows or there is something wrong with Windows Firewall?

Update: Websocket works in Safari on Windows. I try to uninstall Firefox and Chrome, it still doesn't work. I tried and it works on other Windows 7 computer (my friends and on VM). There must be some problems with my Windows 7.

Make sure your antivirus isn't blocking WebSockets: https://github.com/LearnBoost/socket.io/wiki/Socket.IO-and-firewall-software

Faced the same problem. The way out of this is to make your web-sockets secure. Switch to wss calls and everything should be fine.

This is transmission protocol configuration problem, set your socket.io config:

io.set("transports", ["xhr-polling"]);