Double Submission Prevention

    In my opinion, a very simple but very useful improvement: to remember the text of the last comment sent by the user (or a hash so as not to waste space), and if the comment following it is exactly the same, do not create it.

    I think no need to explain why.

    UPD: I’ll explain :)
    Situation 1. Inadvertently we poke sending an ajax twice. The button either does not disable or does not have time to re-lock - this is always real. Double post.

    Situation 2. With Opera Mini (this is my scenario, I think there are other similar ones) I am sending a comment. She thinks for a long time, I decide that the comment did not go, I submit a second time. And the comment went. Double post.

    Also popular now: