[LRUG] Double submit
Andrew Stewart
boss at airbladesoftware.com
Fri Apr 24 08:12:23 PDT 2015
Thanks, everyone, for all the suggestions.
> Tom:
> I assume we’re talking about a POST request that has side effects that shouldn’t be repeated, like sending an email or creating a row in a database table.
Yes, that's exactly what I'm talking about.
I hadn't thought of debouncing the side-effects instead of the requests. Presumably one would have to explicitly code this in wherever necessary. In contrast a middleware approach could apply to all POSTs.
> Rob:
> ... in the event of a double-click, it's the second submission that the user will actually see. If you're showing something useful on the confirmation page (even just the confirmation itself), you don't want to lose that in favour of a validation message.
That seems like a fairly crucial point – does it always hold? No matter whether we somehow ignore the second POST or debounce its side-effects, we want the user to see the result of the first POST.
I think I'll experiment a little and see how things shake out.
Bon weekend!
Andy
More information about the Chat
mailing list