Situation: I have a forum and in the last decade posting new entries was a a simple HTTP form created with the FormHelper. The forum is supposed to run on a cheap webhoster, so the reliability isn’t always the best. Sometimes the posting-form was send into the timeout/server-error Nirvana, which is of course frustrating.
In the future the form is send via JS in the background and not left before the server responses with an OK.
I also want to prevent double postings in case that the server received and executed the request (creating a new posting) but the response failed to reach the client.
I thought about a few schemes which could work, but I’m not really happy with any of them so far. The best I came up with: attach an UUID to a new posting form, send that UUID with the request and store it on the server, check if that UUID was used/exists when a new request comes in.
Any other ideas?