redirect without changing url javascript code example Example: javascript change url without redirect window.history.pushState("", "", '/newpage');