admin管理员组文章数量:1336632
When observing the Network
tab of Chrome's Developer Tools on a profile page on Facebook, I noticed that almost no XHR requests have been captured. Clicking around the profile page, like clicking on a link to view the profile's photos shows that no AJAX requests have been made, but the site seems to remain on the same page like a single-page-application and behave very AJAX-like.
Does Facebook profile pages really use AJAX requests like jQuery's $.get()
? If so, why dont they appear in Developer Tools. If not, how can I achieve the same effect?
When observing the Network
tab of Chrome's Developer Tools on a profile page on Facebook, I noticed that almost no XHR requests have been captured. Clicking around the profile page, like clicking on a link to view the profile's photos shows that no AJAX requests have been made, but the site seems to remain on the same page like a single-page-application and behave very AJAX-like.
Does Facebook profile pages really use AJAX requests like jQuery's $.get()
? If so, why dont they appear in Developer Tools. If not, how can I achieve the same effect?
- 1 They probably use JSONP – Greg Guida Commented Jul 31, 2012 at 0:33
- In Chrome I'm observing all sorts of traffic both active (I'm doing something, clicking a button) and passive (periodic requests for new information). Try turning on console logging of of XMLHttpRequests (Bottom Right corner of the Developer Tools window, then under Console). Then observe the Network tab and the console and see if that makes a difference. – Brandon J. Boone Commented Jul 31, 2012 at 2:14
2 Answers
Reset to default 5I have gotten bitten by this myself in the past. When viewing the Network tab, you can filter out what kind of requests you want the developer's tools to show. By default "all" is selected. However, if you accidentally click on "JS", "CSS", etc, then only those requests will be displayed.
Click "All" and your problem will be resolved.
Offcourse you can capture JSONP-requests. JSON-P is nothing more than ordinary JSON-data, but wrapped in a JavaScript function. Responses will look like:
jQuery17206302290489639558_1343824008197([{"
That it might not show up in Chrome developer tools may be caused by usage of HTTPS.
By the way, if you are interested or perhaps currently exploring how to interact with Facebook API, there are plenty of (free) and online tools out there. Apigee's Facebook Console is a really good one: https://apigee./console/facebook
本文标签: javascriptAJAX requests not captured by Chrome Developer ToolsStack Overflow
版权声明:本文标题:javascript - AJAX requests not captured by Chrome Developer Tools - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742413894a2470334.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论