11

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 requests        90KB            10.22s (onload 6.57s)

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)?

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

2 Answers2

12

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.

Sebastian Zartner
  • 18,808
  • 10
  • 90
  • 132
Martin Algesten
  • 13,052
  • 4
  • 54
  • 77
  • So, going by the sample timings I posted: After the server response was received, 6.57 seconds elapsed before the onload event fired. Am I getting this right? –  Nov 24 '10 at 05:48
  • 1
    It includes the onload event itself (clarified in my answer). So all page init up until and including onload. Then the other 4 seconds is stuff happening after onload. – Martin Algesten Nov 24 '10 at 06:02
-1
  • 6.57 secs until the onload event is fired
  • 10.22 secs until all other things are loaded (eg set on the onload event)
ipopa
  • 1,223
  • 11
  • 12