title: Browser Back Button and Previous Page URL
body: <p>I have a few questions related to the browser back button:</p>
  
  <ol>
  <li>How can I identify the URL of the previous page through which I have come to the current page?</li>
  <li>How can I identify that the request made is for the previous page in the browser history?</li>
  <li>How can I know that the user has clicked on the back button of the browser?</li>
  </ol>
  
  <p>We have a requirement that when the user clicks on the back button in the application at some point in the application he is returned to an error page.</p>
  
  <p>The implementation has to be through Javasctipt. I tried working with the history object but as of now I am stuck. Please help me.</p>