title: Javascript document.referrer with full querystring
body: <p>I am trying to get the full referring url to a page via javascript.</p>
  
  <p>So far the closet I have come is </p>
  
  <pre><code>var lastUrl = document.referrer;
  </code></pre>
  
  <p>This does not include the query attached to the url.</p>
  
  <pre><code>var lastUrl = document.URL;
  </code></pre>
  
  <p>returns the current URL with the querystring intact.</p>
  
  <p>Is there anyway of easily obtaining the referring url along with the referring query.</p>