window.setTimeout(function() { window.addEventListener("popstate", function() { window.location = location.pathname; }, false); }, 1);