title: Ajax calls with window.history.pushState working with popstate "Back" button
body: <p>Inside a program the user navigates around, and they want the history that is generated by window.history.pushState to work with their back button in their browser (because for whatever reason they will not click the back buttons in the application)</p>
  
  <pre><code>window.history.pushState({"html":'Visited Page',"pageTitle":'Page Title'},"",'http://exampleurl.com/item/');
  </code></pre>
  
  <p>To catch them hitting the back button I simply use:</p>
  
  <pre><code>$(window).on("popstate", function(e) {
      // history.go(-1); 
      /* As you can see this was an attempt to make it work it only goes back to the last actual page visit */
  });
  </code></pre>
  
  <p>How do I get the last URL in their history to then window.location and send them there, or better yet how do you make the browser respect the pushed history?</p>
  
  <p>Or is there anyway to get what the URL was.</p>