Mots clés : javascripthtmlurlurl-rewritingfriendly-urljavascript
97
function processAjaxData(response, urlPath){ document.getElementById("content").innerHTML = response.html; document.title = response.pageTitle; window.history.pushState({"html":response.html,"pageTitle":response.pageTitle},"", urlPath); }
window.onpopstate = function(e){ if(e.state){ document.getElementById("content").innerHTML = e.state.html; document.title = e.state.pageTitle; } };
88
window.history.pushState('page2', 'Title', '/page2.php');
71
if (window.history.replaceState) { //prevents browser from storing history with each change: window.history.replaceState(statedata, title, url); }
66
history.pushState({}, null, newUrl);