大网数据广告活动
网站运营与故障问答

DOMContentLoaded vs. 'load' event vs. "Finish"

· 52CE 我爱测

I understand that the Difference between DOMContentLoaded and load events , has already been answered, and as such it explains the last two values (1.40s, 4.66s) from Developer Tools, but if the 'load' event " can load event can …

问题原文

原帖链接 · marko-36 · CC BY-SA 4.0

I understand that the Difference between DOMContentLoaded and load events, has already been answered, and as such it explains the last two values (1.40s, 4.66s) from Developer Tools, but if the 'load' event "can load event can be used to detect a fully-loaded page", then is supposed to announce? I mean, the page is actually fully loaded after everlasting 32.36 seconds, when "Finish" happens, and the 'load' event kinda loses its meaning.

已采纳解答

原帖链接 · Maximillian Laumeister · CC BY-SA 4.0

Many web pages that make requests using JS are never really fully loaded, because they can always request more assets seconds, minutes or even hours later, either to update the page (think like Gmail) or as a result of a user action.

A simplified way to think about the load timer is that it measures the amount of time between when the page started loading and when the browser finished loading in all of the assets that were requested by the HTML and CSS.

The Finish timer, in contrast, measures the amount of time between when the page started loading and when the browser finished making its last request.

It's a little more complicated than that but that's the general gist.

For a web page that makes no requests after the page finishes loading, the Finish timer should stop shortly after the load timer. But for a web page that makes AJAX requests, the Finish timer will continue to run as the page continues to make requests after page load.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2020-06-01)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。