相关疑难解决方法(0)

Chrome的加载指示器在XMLHttpRequest期间保持旋转

我正在编写一个使用Comet/Long Polling来保持网页最新的AJAX网络应用程序,我注意到在Chrome中,它会将页面视为始终加载(标签图标不断旋转).

我认为这对谷歌Chrome + Ajax来说是正常的,因为即使Google Wave也有这种行为.

那么今天我注意到Google Wave不再保持加载图标旋转,任何人都知道他们如何解决这个问题?

这是我的ajax调用代码

var xmlHttpReq = false;
// Mozilla/Safari
if (window.XMLHttpRequest) {
   xmlHttpReq = new XMLHttpRequest();
}
// IE
else if (window.ActiveXObject) {
   xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlHttpReq.open('GET', myURL, true);
xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlHttpReq.onreadystatechange = function() {
   if (xmlHttpReq.readyState == 4) {
      updatePage(xmlHttpReq.responseText);
   }
}
xmlHttpReq.send(null);
Run Code Online (Sandbox Code Playgroud)

javascript ajax google-chrome comet long-polling

31
推荐指数
1
解决办法
2万
查看次数

标签 统计

ajax ×1

comet ×1

google-chrome ×1

javascript ×1

long-polling ×1