javascript document.location on change code example Example: window replace url location.replace("url");