How to get the parts of a url using document.referrer?
<p>I need to use <code>document.referrer</code> to get the previous URL I also need to be able to get the parts of the URL like:</p>

<pre><code>window.location.protocol
window.location.host
window.location.pathname
</code></pre>

<p>but I can't figure out how to do it with <code>document.referrer</code>.  Anyone got any ideas?</p>
