js rewrite url without reload code example
Example 1: javascript change url without reload
window.history.pushState('', 'New Page Title', '/new-url.php');
Example 2: without refresh update url in js
history.pushState(state, title, url)
window.history.pushState('', 'New Page Title', '/new-url.php');
history.pushState(state, title, url)