How to get the previous page url using js
<p>how do I get URL of previous page in js.</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 history.previous, but am not getting it to work.</p>
