I have the test code below. I was expecting Firefox to display the first image, execute the delay and suspend the retrieval of the second image then display "Hello" and the second image.
Why is it displaying everything at once after the delay?
UPDATE: I need to add more clarification. I am NOT trying to write production code. I read that a browser would suspend execution of a js script until it's done and then continue displaying whatever is present after the script tag. This includes retrieving images on the other browser connections. I am trying to prove that's what actually happens and it's not.
<body>
<img src="images/web.gif" /><br />
<script type="text/javascript">
document.body.innerHTML = "";
for (var i = 0; i < 1000000000; i++) {
}
document.write( "hello<br />");
</script>
<img src="images/web2.gif" /><br />
</body>