How to Redirect User Using JavaScript?


Use window.location.replace() or window.location.href

// For behavior similar to HTTP Redirect

// For behavior similar to clicking a link
window.location.href = new_url;

Latest Questions

javascript How to Check if a Javascript Array Includes a Given Value? javascript How to Completely Uninstall Nodejs, and Reinstall From Scratch on Mac OS X? javascript How to Map Values of a Javascript Object to a New Object Using a Function?