Firebug Net Panel的计时:什么是上载时间? [英] Timing with the Firebug Net Panel: What is the onload time?

查看:67
本文介绍了Firebug Net Panel的计时:什么是上载时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Firebug网络面板查看响应时间.在网络面板的状态栏上,摘要显示如下:

I'm using the Firebug net panel to see response times. On the net panel's status bar, the summary is displayed as follows:

10个请求90KB                       10.22s(载入6.57s)

10 requests        90KB            10.22s (onload 6.57s)

上载时间是什么意思?这是否意味着一旦从服务器接收到内容,页面又需要花费6.57秒才能变得可用(即,onready事件结束)?

What does that onload time mean? Does it mean that once the content was received from the server, it took another 6.57 seconds for the page to become usable (i.e. for the onready event to finish)?

注意:我正在测试的站点非常繁琐,其中包含Qooxdoo组件和大量JavaScript.

Note: The site I'm testing is VERY heavy with Qooxdoo components and oodles of JavaScript.

推荐答案

您的页面初始化顺序为:

You page initialization order is:

  1. 头脚本
  2. 正文脚本
  3. 加载
  4. 以后的事情

因此,"onload"是引发onload事件并完成执行之前的时间. Firebug中onload的计时已全部初始化,包括onload事件本身.

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一直等待页面引用的所有资源,直到加载了onload(图像,脚本,CSS等)为止. onload之后的事情更加初始化-通常由setTimeout()触发,以便在一切就绪后执行操作. setTimeout()中的任何内容都是新的调用堆栈,而不是onload的一部分.

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.

这篇关于Firebug Net Panel的计时:什么是上载时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆