Find out when all the content really finished downloading

Is there a reliable cross-browser solution to find out when all contents on a website finished loading? Since I have a lot of downloadable material (some of them are in the iframe), this does not work (the event fires even if the browser loading indicator is still spinning):

$(window).add('iframe').bind('load').promise().done(function() {
    alert('Too early :(');
});
+5
source share
2 answers

I really use this:

$(window).load(function () {
    // loading done, now perform for example animate/remove loader icon.
});

You can learn more about it here:
http://api.jquery.com/load-event/

there is also a warning:

Download event warnings when used with images

, .load(), - , ( ) . , . :

-

    WebKit, src src, .     DOM
    , .

, mac/win,

+1

iframe .

$(function(){
    parent.function();
});
0

All Articles