Page Initialization: Does one need onload?
<p>Regarding this <a href="http://stackoverflow.com/questions/886668/window-onload-is-not-firing-with-ie-8-in-first-shot">SO</a> article and this <a href="http://stackoverflow.com/questions/5168022/the-window-onload-event-is-not-firing-in-ie8">SO</a> article.  I looked at these after noticing my web app does not fire in IE8...I don't care about backward compatibility at the moment but if it's one line of code why not?  Anyways the other issue I was having is the onload event waits for all the content to load...so the user has no controls if he/she is waiting for images to download.  This led me to believe that I should just use</p>

<pre><code>&lt;script type='text/javascript'&gt;my_initialize_function()&lt;/script&gt;
</code></pre>

<p>placed in the html where I want the page to initialize.</p>

<p>and say to bye to</p>

<pre><code>window.onload = initializePage;
</code></pre>

<p>or</p>

<pre><code>window.addEventListener('load',initialize_page);
</code></pre>

<p>or any similar.</p>

<p>My question is: Is this a valid approach to initializing one's page?</p>

<p>PS: I'm not using any libraries including JQuery...and obviously I would not try to initialize elements that have not been loaded yet.</p>
