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
If i understand #3892 and #883 correctly, document.referrer is not supposed to be used with the Vue 3 Router.
What I am trying to achieve is to implement a custom back button, that checks the previously visited page from the Router History, and if the page is within my own application (same domain name), it should use router.back() and do it, but if the page is outside of mine (other domain or nonexistent, user entered url directly, etc...) then it should navigate to the homepage instead.
To do that, I need to know the domain of the last history entry. The router itself only provides the part AFTER the domain and document.referrer is always empty.
I also cannot manually store the last page because it would either only work once, or if it was a stack, it would get messed up when using router.back().
How am i supposed to achieve this goal?
The text was updated successfully, but these errors were encountered:
If i understand #3892 and #883 correctly,
document.referrer
is not supposed to be used with the Vue 3 Router.What I am trying to achieve is to implement a custom back button, that checks the previously visited page from the Router History, and if the page is within my own application (same domain name), it should use router.back() and do it, but if the page is outside of mine (other domain or nonexistent, user entered url directly, etc...) then it should navigate to the homepage instead.
To do that, I need to know the domain of the last history entry. The router itself only provides the part AFTER the domain and
document.referrer
is always empty.I also cannot manually store the last page because it would either only work once, or if it was a stack, it would get messed up when using router.back().
How am i supposed to achieve this goal?
The text was updated successfully, but these errors were encountered: