On the server, I changed the transport to websocket, and used socket.io-client.js as the client, and it worked.
socket.io-client.js