When document.readystate == complete is the same when onload loads?

In Internet explorer, when onreadystatechange is started and the readystate switches are complete, is it the same as when the onload event is fired? Have all your requests completed by this time?

+8
javascript internet-explorer javascript-events
source share
2 answers

document.onreadystatechange usually more optimal than window.onload , because it fires before all external resources, such as images, are loaded. However, at the moment this is not very well supported (but if you are only concerned about IE, then this is not a problem).

See: https://developer.mozilla.org/en/DOM/document.onreadystatechange

Or, for IE: http://msdn.microsoft.com/en-us/library/ms536957(v=vs.85).aspx

+6
source share
+2
source share

All Articles