DOMReadyTime VS PageLoadTime
Top  Previous  Next

The window.onload (PageLoadTime) event is used by programmers to kick-start their web applications. This could be something trivial like animating a menu or something complex like initialising a mail application. The problem is that the onload event fires after all page content has loaded (including images and other binary content). If your page includes lots of images then you may see a noticeable lag before the page becomes active. The DomReady is fired when the DOM content has loaded and you can access all HTML Elements without waiting for all those images to load also. which just means finding out when the document's DOM tree has fully initialized, versus the entire document and every object in it. A classic example is the insertion/ deletion of nodes via the DOM, which can in fact be done sooner rather than later, when the DOM has loaded versus the document itself (window.onload).

There is a sample page that demonstrates this difference.

See Also
Webpage/Process Grouping