Comment by chuckadams
12 days ago
It sounds like something you'd use for a POST route that served up html instead of JSON (weird for an app to do these days but it still happens). redirect-after-post is as old as the web (or at least the POST verb) and it actually _enhances_ the utility of the back button by removing the annoying prompt about re-posting.
There are countless usecases for redirects.
A few examples of the top of my head:
when urls have changed,
when a resource/entity has been deleted,
when you wish to provide a unified entrypoint that sends users to another url so that you can easily change the redirection target in the future (i.e. redirecting a / to a /entities, so youre but blocking the / path if you want to add a homepage/landing page later)
I don't think I'd help with posts though. They do indeed usually send back a redirect - but the post is likely still in the history unless the website send it as AJAX/without a history entry (basically via JS fetch() instead of form action=)