> > domComplete

Created: November 11th 2015

domComplete document has been parsed / loaded css CSS and other subresources have been parsed / loaded

What is domComplete?

  • domComplete is the time immediately before the user agent sets the current document readiness to 'complete'.
  • It simply means the page and all of its subresources are ready.
  • All of the processing is complete and all of the resources on the page (images, etc.) have finished downloading - the loading spinner has stopped spinning.
browser with html file and clock

Why measure domComplete?

The domComplete 1 time represents the end of the browser processing a document. The browser has received the document, processed it and has done the same for the page subresources like images and CSS.

To a user, this is the point where the browser tab spinner stops spinning 2. To a developer, this marks the beginning of the time to add additional application logic / javascript.

Complete - current document readiness

When document.readyState has a status of "complete", it means that the document (example: html file) is now parsed and loaded and all known document subresources like CSS and images have been parsed and loaded.

state = complete

When document.readyState reports it is complete, it also means that the load event is about to be fired.

What happened just before domComplete?

Just prior to the domComplete was domContentLoaded.

What happens immediately after domComplete?

Assuming all goes well, the next step is the onLoad event.

Patrick Sexton by