On my mobile, in safari If I go to my default page that has alert("Hello")
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.
How do I only show the message once the whole page is visible. I've read that window.onload
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:
$(document).ready(function () {
window.onload= alert('Test');
});
and
<meta http-equiv="Pragma" content="no-cache"/>
in case it has something to do with cache but I don't think this is the issue. Any ideas ?
Thanks