Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Http Post was not designed to be Idempotent so, basically you either fix double submission or your post starts to be Idempotent, which is basically against the spec (it’s not directly against it, but put would be preferred in that case). Of course you can always add an uuid hidden field and do upsert instead of insert/update. But such things are way harder to do.


Had things gone differently you could tell your form to use a put. Not sure if that works in current browsers.

Either way you'd need to validate the input in the server side anyway. What are you going to do if the user (agent) misbehaves? Reddit frequently has this problem with comments popping up lots of times because of a shaky connection, and frankly I dislike letting data quality rely on your users behaving as you expect.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: