缺少“DomContentLoaded”和“加载” Firebug 网络面板中的时间信息

发布于 2024-08-09 06:44:48 字数 277 浏览 6 评论 0原文

Firebug 在报告发出 HTTP 请求时相对于“DomContentLoaded”和“加载”时间的相对时间方面非常出色。然而,一旦“加载”事件发生(如时间线上的红线所示),此后的请求就没有任何关于这两个事件发生的时间的信息。

令人困惑的是,这些请求(通常位于时间线的底部)似乎是在页面加载开始时就开始的。当我在时间线中看到此类条目没有有关“DomContentLoaded”和“加载”事件时间的信息并且似乎在页面加载事件之后发生时,有人可以解释一下我应该推断什么吗,仍然网络面板显示他们从头开始?

谢谢!

Firebug is awesome in reporting the relative time when an HTTP request was made with respect to the 'DomContentLoaded' and 'load' time. However, once the 'load' event occurs (seen by the red line on the timeline), the requests thereafter do not have any information about how later they occurred with respect to the two events.

To confuse things, these requests (usually at the bottom of the timeline) appear to have started right at the beginning of the page load. Could somebody shed some light on what should i infer when i see such entries in the timeline which do not have information about the 'DomContentLoaded' and 'load' event times and appear to have occurred after the page load event, still net panel shows that they started at the beginning?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

错爱 2024-08-16 06:44:48

当检索到从初始 html 页面引用的所有文件时,会发生 load 和 DOMContentLoaded 事件。对于 DOMContentLoaded,该事件在页面的初始 DOM 完全加载时发生。从初始 html 文档加载的文件将在时间轴上相对于该文档显示。

一旦 JavaScript 开始执行,就会出现额外的网络流量,通常是通过 XmlHttpRequests 发送到原始服务器或另一台服务器。当您将鼠标悬停在这些请求上时,不会显示进度事件(已加载、DOMContentLoaded)。由于这些请求可以根据 Web 应用程序内发生的事件触发,因此它们可能会不按顺序显示,它们的左边缘与网页的原始请求对齐。最好不要认为时间线是这些请求和响应的线性序列,而更多地是一个包含实时发生的不同流量表示的网格。

希望这有帮助!

the load and DOMContentLoaded events occur when all the files referenced from the initial html page are retrieved. In the case of DOMContentLoaded, the event happens when the initial DOM for the page is fully loaded. Files loaded from the initial html document will be displayed relative to that document on the timeline.

Additional network traffic can occur as soon as JavaScript begins execution, often through XmlHttpRequests to the originating or another server. These requests won't have the progress events (loaded, DOMContentLoaded) displayed when you hover over them. Because these requests can be fired off based on events happening within the web application, they may be shown out of sequence, their left edge lining up with the original requests for the web page. It's best not to think of the timeline is a linear sequence for these requests and responses, but more of a grid containing different representations of traffic as it occurs in real-time.

hope this helps!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文