How to Redirect User Using JavaScript?
Use window.location.replace() or window.location.href
// For behavior similar to HTTP Redirect
window.location.replace(new_url);
// For behavior similar to clicking a link
window.location.href = new_url;
Use window.location.replace() or window.location.href
// For behavior similar to HTTP Redirect
window.location.replace(new_url);
// For behavior similar to clicking a link
window.location.href = new_url;