title: Find the last visited URL in javascript with history
body: <p>I know about <code>document.referer</code> and this is not what I'm looking for.
  It could probably be a solution but I want to retrieve it in local without using server.</p>
  
  <h2>Steps :</h2>
  
  <ul>
  <li><p>I'm pushing a new state in the current url of my page with <code>history.pushState('','','#test')</code></p></li>
  <li><p>I'm going to the next page.</p></li>
  <li><p>And now I want to retrieve the URL but <code>history.previous</code> <a href="https://developer.mozilla.org/en-US/docs/Web/API/History#Properties" rel="nofollow">has been erased since Gecko 26</a>.</p></li>
  </ul>
  
  <p>Is there an other way of getting this value except from using cookies or sessionStorage?</p>