Preventing duplicate form submissions

后端 未结 3 1226
灰色年华
灰色年华 2020-12-16 01:19

I came up with a technique to prevent duplicate form submission by going back/forward or refreshing the page. And I thought about duscussing it here, I already tested a samp

3条回答
  •  遥遥无期
    2020-12-16 01:54

    It looks like you are getting overly complicated with this. My favorite way, because it also prevents some session jacking hacks at the same time, is described here:

    http://www.spotlesswebdesign.com/blog.php?id=11

    It's simple and easy to impliment on any form. It uses a randomly generated page instance id to verify that the form submission received is identical to the last page served to that particular user.

提交回复
热议问题