why document.write doesn't complete as expected
<p>Just trying to set up a little test page and even it doesn't behave as expected.</p>

<p>Given the following working code:</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset="utf-8"&gt;
&lt;meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"&gt;
&lt;title&gt;Terry's Test Page&lt;/title&gt;
&lt;script src='jquery-1.7.1.min.js'&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;p&gt;from the html in index.html&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>I get what I expect, the one line from the html and Terry's Test Page in the tab label. However, if I add just before the <code>&lt;/head&gt;</code> line:</p>

<pre><code>&lt;script&gt;$(document).ready(function() {
document.write('&lt;p&gt;from the js&lt;/p&gt;');
});
&lt;/script&gt;
</code></pre>

<p>I properly get the 'from the js' line -- no from html since document.write replaces it -- but the tab label is not filled with Terry's Test Page. In IE the tab label shows the url, in Firefox it shows 'Connecting ...' but it never gets beyond that.</p>

<p>What is it about document.write that I don't understand? Do I have to issue some sort of end of file or some such?</p>
