title: Ignore Safari's Initial Page Load popstate
body: <p>I'm using pushState and generating the page view on popstate events based on the history.state of the current page.</p>
  
  <p>If there is no history.state I (hope) to reload the document.</p>
  
  <pre><code>window.onpopstate = function(event) {
      if( window.history.state !== null ){
          // page was ajax created and history created by pushState
          // recreate with ajax
      }
      else{
          // page was loaded from server normally
          document.location.reload()
      }
  }
  </code></pre>
  
  <p>At issue is Safari fires a popstate event on the initial page load.
  Chrome and Firefox fire popstate on the back/forward browser button. </p>
  
  <p>I want to ignore the initial load popstate event on Safari (ideally without setTimeout and without browser detection).  </p>
  
  <p>Additionally, the site is a mix of links - some that will trigger pushState and some that will load normally from the server - so if a user is ten pages into navigation history and clicking the back button, the history will have a mix of pushState pages and non-pushState pages. </p>