title: How to get the previous page URL using JavaScript?
body: <p>How do I get the URL of previous page in JavaScript?</p>
  
  <p>Say, I go from page A to B, and use browser back button to go back to page A.</p>
  
  <p>I've tried to use <code>history.previous</code>, but I'm can't get it to work.</p>