How can I stop a HTML page after the <head>...</head> loads using javascript?
<p>I have a URL rewriting proxy server (EZproxy) that can be set up like this to provide one-click access to target URL's, providing an authentication challenge when needed but getting out of the way when it's not needed. </p>

<p><a href="http://url-rewriting-proxy-server.com/login?url=http://target-url.com" rel="nofollow">http://url-rewriting-proxy-server.com/login?url=http://target-url.com</a></p>

<p>I would like load a URL like above and then stop the page, only loading the <code>&lt;head&gt;&lt;/head&gt;</code>.</p>

<p>I would like to use a bookmarklet (server side code is OK) to accomplish this.</p>

<p>Can I do this programmatically with Javascript? If so, how? If Javascript is a bad idea, are there alternatives?</p>

<p>Will your solution work in Mobile Safari?</p>
