title: pushState on Ajax call?
body: <p>My client is tormenting me to be able to go back to a 'previous page' using the browser back button. The thing is that this 'pages' are being called via Ajax to a modal window that displays the content. I'm doing an ajax call and I found that pushState will be my solution, but I really don't get it. I found stuff where there's not even a bit of ajax, it's all javascript.. So, <strong>what should I do to add pushState to an ajax call? Is that even possible? Or should I just a find a way to make it work with Ajax?</strong></p>
  
  <p>I found this thing called Pjax but I really don't get it. My ajax call looks something like this;</p>
  
  <pre><code>$(function() {
      $('.w-container .w-nav-menu a').click(function() {
          var $linkClicked = $(this).attr('href');
          var $pageRoot = $linkClicked.replace('#', '');
          if (!$(this).hasClass("active")) {
              $(".w-container .w-nav-menu a").removeClass("active");
              $(this).addClass("active");
              $.ajax({
                  type: "POST",
                  url: "./PATH/load.php",
                  data: 'page='+$pageRoot,
                  dataType: "html",
  
                  beforeSend: function(){
                          $('#canvasloader-container.wrapper').show();
                      },
                  complete: function(){
                          $('#canvasloader-container.wrapper').hide();
                      },                
                  success: function(msg){
                      if((msg))
                      {
                          $('.content').html(msg);
                          $('.content').hide().fadeIn();
                      }
                  }
  
              });
          }
      event.preventDefault();
  });
  </code></pre>
  
  <p>I'm sorry if someone else already created something like this, but I didn't find anything useful</p>