In my application, I have a "Home" page as well as a "Success" page.
On the Success page, there is a button that, when clicked, redirects to a URL like https://google.com
, using
window.location.href='https://google.com'
.
Currently, I am able to navigate from the Home page to the Success page using vue-router and then click the button to go to the specified URL. However, upon pressing the browser's back button, I would prefer it to take me back to the Home page instead of the Success page.
Is there a way to achieve this desired behavior?