0👍
If you want to make the back button play nice with client-side routing, you could change your history mode and add a server. If you’re trying to override default behavior, you can use navigation guards. You can check popstate
as in some of these examples to detect if the navigation actually came from your code or not, but note that the Vue Router code in those solutions is mostly outdated.
Source:stackexchange.com