I have a suggestion to improve the usability of perlmonks.org. The recent availability problems have highlighted an issue with CGI processes being chopped. If this is happening part way through processing a posted form, partial results are ensuing.

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


In reply to Adding idempotency to the monastery by rinceWind

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.