Answers for "url update javascript"

1

js update query string

var searchParams = new URLSearchParams(window.location.search);
searchParams.set("foo", "bar");
window.location.search = searchParams.toString();
Posted by: Guest on October-28-2020
5

javascript change url without reload

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

Code answers related to "Javascript"

Browse Popular Code Answers by Language