I want to execute a script after loading the whole page when it is complete.
Current Method:
window.onload=document.getElementById('loaded').value=1;
This is not very good, as some images are still loading, and the page did not complete the download for real. What am I doing wrong?
Of course, does not work for me in Chrome and Firefox. The fact is that I run the code after, which returns the status of 204, and this blocks future downloads. But he seams this status 204 returns before the page has finished loading. So I need to execute the code after the page loads.
EDIT
customize the page that makes the framework
<iframe id="myframe" height=1 width=1></iframe> <script type="text/javascript"> window.onload=document.getElementById('myframe').src='http://link to a frame braker page'; </script>
when you put the above code on the page, it loads the iframe before the page is fully loaded. Just put a warning on the iframe page and try on a slower server, where your parent page contains large images, etc.
source share