I'm pretty certain that most of my duplicates arise as a result of the sequence:
- Click "create"
- Switch to another tab or program.
- Come back to PM a few seconds or minutes later and see the "Create" button, and assume that I must have forgotten to click it, and so click again.
Basically, PM is so slow that the screen hasn't updated at all after many seconds or even minutes.
A better solution than trying to detect duplicates, might be to ensure that the browser changes quickly. I'm not suggesting bigger servers or anything like that, but simply that something get sent back to the browser immediately, before the heavy work of processing the page is undertaken.
I don't know enough about the PM server setup (or CGI or Apache or...) to know if that is possible, but playing with a local webserver, I found that if you print the html header immediately, and then do your processing and page generation, my browser (Opera), clears the tab and sets the busy icon, which would at least prevent the button being clicked again.
Maybe index.pl could use rewrite tricks to display an intermediate page prior to getting down to the heavy stuff?
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [Watch: Dir/Any] |
To prevent clicking the submit button again, one could use a little bit of (client-side) Javascript. Some change to the page should happen when the onSubmit event triggers, something that happens on many other sites, too. Some sites simply disable the submit button, annoying all users with temporary network problems, because you simply can not re-submit the form after a network outage. Some other sites change the label of the button to something like "please wait ...". A third category of sites injects or unhides a little piece of HTML that overlays the page at least partly and either asks the user to wait or simply shows an animated "loading please wait" GIF.
Monks without an enabled Javascript engine in the Browser would see no difference when the Javascript is done right, the other ones would see at least a faked sign of life.
Alexander
--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
| [reply] [Watch: Dir/Any] |
one could use a little bit of (client-side) Javascript.
No thanks.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [Watch: Dir/Any] |
As there is no "duplicate detection" hidden form field displayed with every form, submitting a form twice will create a second, identical node. There is a partial stopgap that tries to detect absolutely identical posts, but if there is a change, only a unique identifier per form (likely via openform could identify a duplicate submission. What we do once we detect a duplicate submission would be a second thing.
| [reply] [Watch: Dir/Any] |