View Full Version : Let all javascript load before page loads

01-30-2009, 01:00 AM
Hello, I have some javascript code that does some GET and POST requests that are required. Sometimes it doesn't fully execute for the user because they close or click onto another page before the javascript is completely done. Is there anyway I can let all of the javascript load first and slow down the actual page load of the website.

Thank you!

01-30-2009, 01:59 AM
The only way is to have js there before even loading page. Look at the top keyword.

rnd me
01-30-2009, 08:34 AM
if the script tag is in the head tag, it will be loaded before the page.

anything that happens in the body of the script will be executed.

01-30-2009, 11:34 AM
not true for ie6 iframe, first loads HTML, then js, despite js is in the head,
possibly this is allso true disregarding iframe.