问 题
我似乎有长轮询和IE浏览器的一个问题。这是我第一次涉足长轮询,所以我成立了一个简单的测试,看看我是否可以使它发挥作用。这似乎表现得蛮好用FF和铬,但我得到不同的结果与IE浏览器。
首先,这里的一些code:
HTML /
JavaScript的:
PHP:
In FF/Chrome, I'm seeing expected data:
hello
Success: 1356104196
Success: 1356104201
Success: 1356104217
Success: 1356104222
Success: 1356104227
But in IE it repeats the first Success line infinitely. At least I
presume it's infinite as it locks up the browser and won't allow me
to scroll.
I'm not sure what I'm doing wrong. Any help would be much
appreciated.
Thanks in advance.
解决方案
The problem with IE would appear to be the consequence of caching,
probably by IE itself. This could potentially happen in any
browser.
Try adding :
cache: false
to the ajax options.