I’ve found window.location.replace(newURL) and windows.location.href = newURL and I’ve used both and haven’t found a noticable difference, is there a preference of using one over the other?
@ashleyfreemanAug 11.2022 — #It really depends on the use case, with the difference between the two being that window.location.replace() acts as an HTTP redirect, meaning that it does not leave an entry in the browser's history, while window.location.href acts the same as clicking on a link and the user would be able to go back to the previous page by using the browser's back button.