Possible ways to duplicate submission form

 

01 server: storing a special mark in the session

When the form page is requested, generates a special marker character string, the presence of session / redis while on the form page. Interview process form data, check the identification string is present, remove it immediately from the session, and then process the data properly. If you find that there are no valid form is submitted string sign, indicating that the form has been submitted, and to ignore this submission.

02 client: Use Cookie Handling

Cookie form submission using the recording state, depending on its state may check whether the form has been submitted.

03 Database: add constraints in the database

Add a unique index constraint

 

It can be used in conjunction with a three or more.

Guess you like

Origin www.cnblogs.com/kbian/p/12275999.html