title: What js should I use to handle back button clicks while using onPopState and pushState
body: <p>I'm using pushState to change the url of a website:</p>
  
  <pre><code>history.pushState("", "info", "/info");
  </code></pre>
  
  <p>Which works great, but now the back button doesn't work.  I believe I need to write my own back and forward button behavior using onPopState that goes through the history stack and renders the appropriate page.  The trick is that when "back" is Null, it should do the thing that the back button normally would do (go "back" to the page before the user entered my site).</p>
  
  <p>This seems like pretty standard behavior, is there a recipe / some standard code I could use?</p>