title: Fastest way to detect external URLs
body: <p>What's the fastest method to detect if <code>foo='http://john.doe'</code> is an external <a href="/questions/tagged/url" class="post-tag" title="show questions tagged &#39;url&#39;" rel="tag">url</a> (in comparsion to <code>window.location.href</code>)? </p>