DEV Community

loading...

Discussion on: How to redirect in SvelteKit endpoints

Collapse
delanyoyoko profile image
delanyo agbenyo

What about doing this for going back to a previous page (history.back()) when a button is clicked..

Collapse
danawoodman profile image
Dana Woodman Author

This article was about doing server-side redirects.

For a client redirect, you could use history.back() or perhaps have a look at the navigation functions: kit.svelte.dev/docs#modules-$app-n...