At the browser end, we see this as a time out. Most of us when we see this, click refresh to re-post. This is resulting in duplicate entries.
My proposed solution is to add a couple of hidden fields:
<input type="hidden" name="sessionID" value="12345"> <input type="hidden" name="requestID" value="45678">
The sessionID is generated when you log in - may have a special value for the Anonymous Monk.
The requestID is bumped up for each input form.
The CGI script will be able to detect duplicates and know what to do. If the entries are identical, it throws one away (it doesn't matter which as they are identical. Otherwise, it takes the longer entry, as this is more likely to be complete.
See also How do I decode a CGI form?, and idempotent definition
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Adding idempotency to the monastery
by vladb (Vicar) on Feb 26, 2002 at 21:20 UTC |