Debugging multiple load and DomContentLoad lines in Chrome Developer Tools Network Tab

邮差的信 提交于 2021-02-09 00:42:34

问题


In the Chrome Developer Tools network tab, there are times for Load and DomContentLoaded. These are marked as a red line and a blue line in the network tools.

https://developer.chrome.com/devtools/docs/network

When analysing some websites, multiple Load and DomContentLoaded event load marker lines appear with the later line updating the final Load and DomContentLoad times in the bottom bar. I am trying to understand why there are multiple event marker lines as the documentation says they should only appear once. It looks like it something to do with pre-loading or iframes but I am not sure how to fully investigate.

A screenshot is below (website tested is http://www.lululemon.co.uk):


回答1:


The lines represent the DOMContentLoaded and Load events from multiple page loads.

When you navigate to a new page Chrome is clearing the list of requests, but the overview is still showing the already recorded data.

Sometimes you can have a multiple DOMContentLoaded events without a Load event, because it's possible to navigate away from the page after the DOMContentLoaded event, but before the Load event.

The whole recording in your screenshot covers 2.5 minutes, but the time from page navigation to page full page load is shown as only 1.7 minutes in the bottom bar.



来源:https://stackoverflow.com/questions/37435668/debugging-multiple-load-and-domcontentload-lines-in-chrome-developer-tools-netwo

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