Before window.onload

Keywords

window.onload, document.onreadyStateChange, document.DOMContentLoaded

Dean Edward had gave us a very good explaination...

The window.onload 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. What we want is a way to determine when the DOM has fully loaded without waiting for all those pesky images to load also...

IFrame which is loaded very slowly

some images which are loaded very slowly