$(window).off().on("popstate", function(){
    console.log("Popstate fired: " + location.href);
    $.getScript(location.href);
  });