Timing with the Firebug Net Panel: What is the onload time?

无人久伴 提交于 2019-12-01 03:13:18
Martin Algesten

You page initialization order is:

  1. head scripts
  2. body scripts
  3. onload
  4. later things

So 'onload' is the time until the onload event is thrown and finished executing. The timing in Firebug for onload is all init up and including the onload event itself.

Onload waits for all resources referenced by the page up until onload has loaded (images, scripts, CSS, etc.). The things after onload are more initialisation - often triggered by setTimeout() to do stuff after everything is in place. Anything in setTimeout() is a new call stack, and not part of onload.

  • 6.57 secs until the onload event is fired
  • 10.22 secs until all other things are loaded (eg set on the onload event)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!