title: Detecting Browser History Actions
body: <p>I am building a Html 5 website using push state and I wondering whether its possible in javascript or JQuery to detect whether the browser's back button has been pushed. I would like to include it in an if statement like so:</p>
  
  <pre><code>if (back_btn clicked){
  //do stuff
  }
  if (forward_btn clicked){
  
  }
  </code></pre>