Closed Uptaker closed 1 year ago
As I understand, svelte-spa-router is not meant to be used with the History API, where the history state seems to always be empty in my case.
How do I programmatically check what was my previous hash-based route/url?
For example, after a push('/login'), I'd like to redirect the user back to their previous page, if that page fits the criteria.
This is not possible I’m afraid, as browsers do not have a history API that allows this, for privacy reasons :(
As I understand, svelte-spa-router is not meant to be used with the History API, where the history state seems to always be empty in my case.
How do I programmatically check what was my previous hash-based route/url?
For example, after a push('/login'), I'd like to redirect the user back to their previous page, if that page fits the criteria.