window.location.href stop if takes long time code example Example: window replace url location.replace("url");