![]() Onload of main page fires without interference of the iframe: the iframe does not block the main page onload !.Iframe starts loading after onload of main page.The Iframe After Onload technique will consistently show the following behaviour in all browsers: addEventListener ( "load", createIframe, false ) Check for browser support of event handling capability getElementById ( "div-that-holds-the-iframe" ). Or the content of the iframe is not immediately visible to the user because it's way down below the fold or hidden behind a link/tab.Ĭonsider deferring the loading of the iframe until after the main page is done. Imagine you want to load something in an iframe, but it's not really important for the page. Test it on your page(s) and run it through a few times, look at the impact on onload (Doc Complete time) and decide if you need a better technique. It's not a big problem if the iframe content takes a short time to load (and execute), and the iframe in itself is good to use because it loads in parallel with the main page.īut if it takes long for the iframe to finish, the user experience is damaged. ![]() My advice: be aware of the onload blocking. The waterfall chart below clearly shows how the Normal Iframe blocks the main page onload. I created a simple test page and ran it through (IE7 and IE8).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |