What does “connecting” mean in Chrome Developer Tools in the Network Tab, and why does it show up only for some sites?

元气小坏坏 提交于 2019-12-04 10:55:33

问题


I've been trying to look for an explanation online but I can't seem to find one. If you go to a site like youtube.com on Chrome and hover over the blue bar corresponding to the file name "http://www.youtube.com/", you'll see four different things:

-Blocking

-Sending

-Waiting

-Receiving

While viewing a different site's page in the network tab, I see

-DNS Lookup

-Connecting

-Sending

-Waiting

-Receiving

It takes a long time to do all these things, even though the page is so simple. What makes my server display different statistical keys for a page load, and what can I do to optimize? In general, where can I find more comprehensive info on network tool?


回答1:


DNS lookup usually happens when you connect to the site the first time and your browser doesn't have its ip address. In this case you can see a small tooltip at the down left corner of the page with text "Resolve www.blablabla.com...." It could be pretty long if the DNS server is slow.

Connecting is the time when the browser has sent a packet for establishing the connection and is waiting for an answer. It can be long if the web server is slow.

Blocking is the time when the browser has to request a resource but 20 other resources have been requested from the same server. In this case the browser will put these request into a queue. It can happens if the server is slow.



来源:https://stackoverflow.com/questions/8795408/what-does-connecting-mean-in-chrome-developer-tools-in-the-network-tab-and-wh

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