change url parameter without redirect code example
Example 1: javascript change url without redirect
window.history.pushState("", "", '/newpage');
Example 2: change url without reloading
function processAjaxData(response, urlPath){
document.getElementById("content").innerHTML = response.html;
document.title = response.pageTitle;
window.history.pushState({"html":response.html,"pageTitle":response.pageTitle},"", urlPath);
}