change url site without reloading code example
Example 1: java script change url without reload
window.history.replaceState({}, '','/dashboard');
Example 2: javascript change url
history.pushState({}, null, newUrl);
window.history.replaceState({}, '','/dashboard');
history.pushState({}, null, newUrl);