weixin_41568110
七度&光
采纳率22.2%
2009-11-30 16:41 浏览 282

浏览器中的请求监视

In Firefox, I use Firebug which allows me to view every http request my ajax calls are making. I've switched over my development to Chrome and am liking it so far. My only complaint, however, is that the developer tools don't seem to allow you to view each ajax request. I've had it happen once where the Resources panel showed multiple requests to the same resource, but it's only done it once and never again.

Is there a way to reliably see every http request that a page is making through javascript from within Chrome?

[Edit:11/30/09 11:55]

Currently, to get around this, I'm running Fiddler next to Chrome to view my requests, but if there's a way to do it from within the browser, I'd prefer that.

转载于:https://stackoverflow.com/questions/1820927/request-monitoring-in-chrome

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

9条回答 默认 最新

  • 已采纳
    csdnceshi65 larry*wei 2010-06-10 22:46

    I know this is an old thread but I thought I would chime in.

    Chrome currently has a solution built in.

    1. Use CTRL+SHIFT+I (or navigate to Current Page Control > Developer > Developer Tools. In the newer versions of Chrome, click the Wrench icon > Tools > Developer Tools.) to enable the Developer Tools.
    2. From within the developer tools click on the Network button. If it isn't already, enable it for the session or always.
    3. Click the "XHR" sub-button.
    4. Initiate an AJAX call.
    5. You will see items begin to show up in the left column under "Resources".
    6. Click the resource and there are 2 tabs showing the headers and return content.
    点赞 25 评论 复制链接分享
  • csdnceshi75 衫裤跑路 2016-12-01 21:31

    Open up your DevTools and press F1 to access the settings. Look for the console section and check the checkbox for "Log XMLHttpRequests".

    Now all of your ajax and other similar requests will be logged in the console.

    I prefer this method because it usually allows me to see everything that I'm looking for in the console without having to go to the network tab.

    点赞 10 评论 复制链接分享
  • csdnceshi52 妄徒之命 2014-05-19 09:01

    You also may use this link in Chrome for more detailed information than the inspector did it.

    chrome://net-internals/#events
    

    This shows the log of all requests of the browser while open

    点赞 8 评论 复制链接分享
  • csdnceshi60 ℡Wang Yan 2009-11-30 16:46

    You could use Fiddler which is a good free tool.

    点赞 7 评论 复制链接分享
  • weixin_41568134 MAO-EYE 2014-05-21 10:15

    Thanks all person who try to help in this post

    I have ubuntu 13.10 and my chrome version is 34.0

    For my situation this works

    1.open developer tools in chrome(or use right click on your page and then select inspect element)
    2.go to "Network" tab
    3.find your ajax request in "Name Path" column 
    4.click on the specific ajax link
    

    now you should see a new Panel in front of you request

    in this panel select "Response" tab
    
    点赞 7 评论 复制链接分享
  • csdnceshi61 derek5. 2011-03-03 11:18

    The most up-to-date answer to this is: they are listed under the 'Network' button in the developer tools, no longer under 'Resources' like it used to be.

    点赞 4 评论 复制链接分享
  • csdnceshi53 Lotus@ 2016-01-19 06:35

    In the step 5 of Phil, "Resources" is no longer available in the new version of the Chrome. You need to click the page icon just beside the Ajax page listed in the bottom pane with the columns of Name, Method, Status, ...

    Then it will show you more panels where you will find the error messages.

    点赞 3 评论 复制链接分享
  • csdnceshi52 妄徒之命 2012-01-13 15:16

    don't know as of which chrome version this is available, but i found a setting 'Console - Log XMLHttpRequests' (clicking on the icon in the bottom right corner of developer tools in chrome on mac)

    点赞 2 评论 复制链接分享
  • weixin_41568134 MAO-EYE 2014-03-01 18:27

    You can also just right click on the page in the browser and select "Inspect Element" to bring up the developer tools.

    https://developer.chrome.com/devtools

    点赞 评论 复制链接分享

相关推荐