domLoading

> > domLoading

Created: September 1st 2015

HTML domLoading

What is domLoading?

  • domLoading is the time immediately before the user agent sets the current document readiness to 'loading'.
  • It means the browser has the document and is about to do something with it.
browser with html file and clock



Why measure domLoading?

The domLoading 1 time represents the very beginning of the browser processing a document. The browser has received the document and is now about to do something with it.

Loading - current document readiness

When a document has a status of "loading", it means that the document (example: html file) is being parsed and dealt with.

state = loading

Other subresources for page are not a factor yet because the initial document is has just begun parsing, so the browser does not know if they exist.

The html itself is currently downloaded (the browser has the html), but it is being processed.

Since this is the first moment of the actual browser process, it can be used as the start time of measuring how our pages are being rendered by a browser.

What happened just before domLoading?

Just prior to the domLoading, the browser completely received the resource (responseEnd).

What happens immediately after domLoading?

Assuming all goes well, the next step is the browser parsing / processing the subresources of the document such as CSS and images. The first step of that is to set the status of the document ready state to "interactive".

The name of the next timestamp will be domInteractive.






Patrick Sexton by