Redirect After Javascript File

location.href property vs. location.assign() method - Stack Overflow

There are three primary ways to trigger a redirect using the window.location object: redirect after javascript

: Replaces the current page in the history stack. The user cannot use the Back button to return to the original page, making it ideal for login or error pages. location

: The most common method. It acts like clicking a link, adding a new entry to the browser's history. redirect after javascript