title: How to get referrer URL after a redirect in javascript
body: <p>If you enter an invalid video id in YouTube (e.g. <a href="http://www.youtube.com/watch?v=XXX" rel="noreferrer">http://www.youtube.com/watch?v=XXX</a>) it will redirect you to a page saying it is a malformed video ID. Is there a way to get the original URL (in this example "<a href="http://www.youtube.com/watch?v=XXX" rel="noreferrer">http://www.youtube.com/watch?v=XXX</a>") in javascript?</p>
  
  <p>(I'm talking about Javascript that will run on the browser after the redirect, through Firebug)</p>