You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Chromium-based browsers, due to implementing History Manipulation Intervention, the back button works as expected and the user returns to the previous page (e.g. this page).
Safari implements something similar and the back button also works as expected.
In Firefox, the user has to click the back button twice to return.
In all cases, the duplicate entry is still visible in the history stack.
Describe the bug
When navigating to a VitePress site from any other domain (e.g. this link: https://vitepress.vuejs.org/), the VitePress router adds a duplicate entry to the browser session's history stack. This occurs because
history.pushState()
is called viarouter.go()
on the initial page load.The effect of this depends on the browser.
In Chromium-based browsers, due to implementing History Manipulation Intervention, the back button works as expected and the user returns to the previous page (e.g. this page).
Safari implements something similar and the back button also works as expected.
In Firefox, the user has to click the back button twice to return.
In all cases, the duplicate entry is still visible in the history stack.
Reproduction
Expected behavior
The extra entry is not added, like when visiting https://developer.mozilla.org/en-US/.
System Info
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: