title: using window.location and window.history
body: <p>If you use gmail, you will notice that once you are logged in, and click the back and forward buttons, the page isn't reloaded, and therefore the navigation is really quick. Doing a little research, I've found out about the window.history and window.location of javascript. It seems that these can be used to achieve the functionality the gmail uses.
  I want to use this on our site, since the reloads every time a user clicks the back and forward button.
  I have found this doc (window. history):  <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window.history" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/API/Window.history</a></p>
  
  <p>But I what triggers the history.back() method for instance? I guess these are called when a user clicks on the back button in the browser? But how do you know when the user clicks the back and/or forward button, so that you can take the necessary action in your code?</p>
  
  <p>Should anyone have a nice js fiddle on the use of window.history, it would be appreciated</p>