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.
Why measure domLoading?
The domLoading 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.
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.