Fork me on GitHub
#luminus
<
2021-10-15
>
Casey10:10:57

when i have a :post handler to handle a form submission, how can i make it so if the user presses refresh it doesn't re-send the post?

Timur Latypoff09:10:12

A usual way would be that the post request handler issues a redirect to a page that can safely be refreshed. There's even a small Wikipedia article about that: https://en.wikipedia.org/wiki/Post/Redirect/Get

Casey08:10:35

Ah of course. It's been a decade since I worked on backend rendered applications... the things you forget :(

🙂 1
Timur Latypoff08:10:09

Yeah, I also re-learned it recently after forgetting long time ago :)