Joke Collection Website - Public benefit messages - Which is safer, foreground check or background check in JAVA? If the background check is safe, why not cancel the front check?

Which is safer, foreground check or background check in JAVA? If the background check is safe, why not cancel the front check?

The foreground verification is generally through Javascript, and the js code can be disabled and tampered with, so the security will be lower than the background verification.

The foreground verification does not need the option that the server returns data, such as the password is empty and the email address is illegal, but it also needs the background verification, such as the repeated verification of the user name, which must be submitted to the background to query the database and return whether it is duplicate. The principle is, if JS can check at the front desk, check at the front desk, which is fast and reduces the pressure on the server.