i have a webpage with an iframe pointing to another website. I dont want this to block the loading of the rest of the page. is there a way to load it asyncrounously?
+1
A:
It shouldn't block. If you want the main page to fully load first (eg, main page's images before iframe content) then you'll have to use a bit of javascript to set the url of the iframe, like <body onload="javascript:...">
Steve Cooper
2010-01-22 01:08:04
A:
One problem we had was that while iframes already do load asynchronously, the main page will not fire OnLoad until the iframe has finished loading too.
We worked around this by 'faking' OnLoad by calling the method we wanted in a script element at the bottom of the main page, even outside the closing body tag:
</body>
<script type='text/jscript' language='javascript'>
BodyOnready();
</script>
Coxy
2010-01-22 01:12:56