I've been trying to get the last visited route, after googling for long time I'm not able to find anything, it looks like is not so simple as it sounds, is it?
What I want is to store the last visited route in a state all of this in order to preload data from ssr when pressing a go back button.
This is an error page so idk from what page the user is coming.
I'm using sveltekit 2.
<button on:click={() => goto('previous-route-here')} on:mouseenter={async () => await preloadData('previous-route-here')}> Go Back</botton>