Well, if its a "duplicate" job, then you could just store away the last(or last 5, however secure you want to be) job sent over the socket; then you could do an equality check on them, and if they are equal(or equal enough, it depends on you application), then you can either (a)cancel the job, or (b)(probably a more user-friendly version)tell the user that they accidently hit reload, and caused a duplicate proccess--which was cancelled.
ORYou could store an array with the last(or last 5, as above) users(assuming that there is some data as such on the form, i.e., unique data describing the user; name, email, etc.). Then, you could match the current user against the array(or scalar), and see if they match; if so, your response can be as above, or whatever suits your purposes.
These are just a few suggestions; there's more than one way to do it, but its hard to know without some more data.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.