在Chrome中停滞并且正在通过JQuery处理jQuery请求 [英] Stalled and pending ajax requests by JQuery in Chrome
问题描述
偶尔,我的应用程序中的Ajax调用(通过JQuery 1.8)在很长一段时间内(有时长达17分钟)都处于挂起状态。
我搜索了它并且所有可能的解决方案都无法运行:
- 我没有安装广告拦截器。 >
- 我在Chrome中禁用了预测网络操作以提高网页加载效果标志。
- 我还为Ajax调用添加了查询字符串(以禁用任何Chrome缓存锁定)。
您有任何想法如何解决这个问题吗?
Thanks。
在下面的示例中,请求处于等待状态17分钟(通过Fiddler进行验证,仅在17分钟后才发送)
GET http://www.mywebsite.com/foo/rest/publishers/1/packages?_=1421584749323 HTTP / 1.1
主机:www.mywebsite.com
连接:保持活动
接受:application / json,text / javascript,* / *;用户代理:Mozilla / 5.0(Windows NT 6.1; Win64; x64)AppleWebKit / 537.36(KHTML,如Gecko)Chrome / 39.0.2171.99 Safari / 537.36
Content-Type:application / json
Referer:http://www.mywebsite.com/foo/client/home
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en; q = 0.8,he; q = 0.6,ru; q = 0.4
Cookie:JSESSIONID = C668509B5AFCDEBE9C9774C4721AFB9D;
aaassz =ddss
查看图片:
我偶然发现了完全相同的问题。只要我禁用:
使用预测服务更快地加载页面
转到高级设置 - >隐私 - >约。第三个复选框,一切都开始按照它应该的方式工作。我无法重现错误。
$ b jquery / ajax
poller在Firefox中完美工作。它仅在Chrome上经过Linux&视窗。
这不是一个完美的解决方案,因为它不会影响全球用户 - 但也许你和我一样 - 受众有限。 p>
Once in a while, my Ajax calls (via JQuery 1.8) in my application are stuck with status "pending" for a long time (sometimes up to 17 minutes). I've googled it and all possible solutions didn't work:
- I have no ad blocker installed.
- I've disabled the "predict network actions to improve page load performance" flag in Chrome.
- I've also added a query string to the Ajax call to make it unique (to disable any Chrome cache locking).
Do you have a any idea how to solve this? Thanks.
In the example below, the request was pending for 17 minutes (verified with Fiddler that it was sent only after 17 minutes).
GET http://www.mywebsite.com/foo/rest/publishers/1/packages?_=1421584749323 HTTP/1.1
Host: www.mywebsite.com
Connection: keep-alive
Accept: application/json, text/javascript, */*; q=0.01
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.99 Safari/537.36
Content-Type: application/json
Referer: http://www.mywebsite.com/foo/client/home
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8,he;q=0.6,ru;q=0.4
Cookie: JSESSIONID=C668509B5AFCDEBE9C9774C4721AFB9D;
aaassz="ddss"
See image:
I have stumbled on exactly the same problem. As soon as I disabled:
Use a prediction service to load pages more quickly
Go Advanced Settings -> Privacy -> ca. 3rd checkbox, everything started to work as it should. I was unable to reproduce the error.
The jquery/ajax
poller works perfectly in Firefox. It's only Chrome - tested on Linux & Windows.
It is not a perfect solution, as it won't affect users in the global sense - but maybe you are in the same situation as I - limited audience.
这篇关于在Chrome中停滞并且正在通过JQuery处理jQuery请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!