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