title: Javascript alert loads before page displays
body: <p>On my mobile, in safari If I go to my default page that has <code>alert("Hello")</code> on the body onload event, the alert displays with my default page fully visible in the background. If I then go to another site for example bbc.co.uk and then type in my the web address for my default page in the address bar, the alert shows with the BBC content in the background, its like the alert loads before the page has loaded.</p>
  
  <p>How do I only show the message once the whole page is visible. I've read that <code>window.onload</code> waits until everything is loaded before it triggers the alert but I must be getting something wrong because the behaviour doesn't change. I've also tried:</p>
  
  <pre><code>$(document).ready(function () {
      window.onload= alert('Test');
  });
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;meta http-equiv="Pragma" content="no-cache"/&gt;
  </code></pre>
  
  <p>in case it has something to do with cache but I don't think this is the issue. Any ideas ?</p>
  
  <p>Thanks</p>