11
votes

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

2 Answers

12
votes

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.

-1
votes
  • 6.57 secs until the onload event is fired
  • 10.22 secs until all other things are loaded (eg set on the onload event)