How to fix the “pending” status in Chrome Developer Window?

流过昼夜 提交于 2019-11-30 22:21:28

问题


When I try to include social media scripts into my page, I get the "pending" status in Chrome on some computers (not all of them):

https://s17.postimg.cc/xvpjllmwv/image.png

In other words, the scripts are not loaded. The scripts are included via the default way as recommended by the developer's guide.

What settings of Chrome may cause such behavior?


回答1:


This is due to the Ad-block or some plugin you are using with the chrome. Disabling the ad-block/plugin which blocks the requests will fix your issue. It blocks all the requests and so it is pending.

Try to fix this way and share the status.




回答2:


Are you using HTTPS on the site?

If you are, chrome blocks http requests within https websites and shows a gray shield near the bookmark star on the url bar.

If this is the case just include your external stuff without specifying protocols

Example:

Change

http://domain.com/some.js to //domain.com/some.js




回答3:


Answer repeated from this question.

I had the same issue on OSX Mavericks, it turned out that Sophos anti-virus was blocking certain requests, once I uninstalled it the issue went away.

You can also try disabling extensions in chrome to see if that helps, if so you'll know an extension is causing the problem. Use the '--disable-extensions flag to see if it fixes the problem.




回答4:


I was using AngularJS as a front-end framework for my app, and somehow $httpProvider.defaults.withCredentials = true; made all my POST requests pending. After I removed this line, everything run instantly.




回答5:


Sometimes the script takes more time in loading while the system has moved on. so make sure you wait for get to give you response before you manipulate it. so rather then doing following

var temp;
$.get('path/to/filename.ext',function(data){

temp = data;

}
//use temp

do this

    var temp;
$.get('path/to/filename.ext',function(data){
temp = data;
//use temp
}


来源:https://stackoverflow.com/questions/17423333/how-to-fix-the-pending-status-in-chrome-developer-window

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!