这有点复杂,但还是这样。
Kthxbye
然而,Firefox和IE必须默认使用其他解决方案,因为它们还不支持WebSockets。
目前看来,两者都默认为xhr轮询传输。从节点.js日志。一切都很好。但是,在IE上,传输/轮询方法似乎有错误。从节点.js日志:
29 Sep 15:30:02 - Initializing client with transport "xhr-polling"
29 Sep 15:30:02 - Client 9219092682469636 connected
29 Sep 15:30:05 - Client 8440734834875911 disconnected
29 Sep 15:30:05 - Client 6149627515114844 disconnected
29 Sep 15:30:07 - Illegal transport "jsonp-polling"
29 Sep 15:30:07 - Illegal transport "jsonp-polling"
所以它看起来就像是在连接,一旦它试图投票,它就会因为“非法传输”问题而断开连接。有人知道那是从哪里来的吗?
还有一些线索,flashconnector似乎加载正确,但我假设它没有运行或无法加载,因为它仍然返回到xhr轮询。从IE中,我可以看到每个轮询周期都会发出以下3个请求:
GET /socket.io/xhr-polling//1285789236601 HTTP/1.1
Accept: */*
Origin: http://plukevdh-desktop:3000
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)
Host: itwebpriv1:8081
Connection: Keep-Alive
Cache-Control: no-cache
HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 25
Access-Control-Allow-Origin: undefined
Connection: keep-alive
---
GET /socket.io/xhr-polling//1285789236616 HTTP/1.1
Accept: */*
Origin: http://plukevdh-desktop:3000
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)
Host: itwebpriv1:8081
Connection: Keep-Alive
Cache-Control: no-cache
HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 24
Access-Control-Allow-Origin: undefined
Connection: keep-alive
---
GET /socket.io/jsonp-polling//1285789241616/0 HTTP/1.1
Accept: */*
Referer: http://plukevdh-desktop:3000/jobs/905390
Accept-Language: en-us
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)
Accept-Encoding: gzip, deflate
Host: itwebpriv1:8081
Connection: Keep-Alive