Answers for "javascript update query params without reload"

5

javascript change query parameter without reloading

window.history.pushState('', 'New Page Title', '/new-url.php');
Posted by: Guest on July-22-2019
0

js update query string without refresh

if (history.pushState) {
    var newurl = window.location.protocol + "//" + window.location.host + window.location.pathname + '?myNewUrlQuery=1';
    window.history.pushState({path:newurl},'',newurl);
}
Posted by: Guest on August-27-2021

Code answers related to "javascript update query params without reload"

Code answers related to "Javascript"

Browse Popular Code Answers by Language