petrit
243
3
General

Prevent app from duplicate requests

Posted 7 months ago by petrit

Sometimes we may come across to the situation where duplicate post requests can be stored into the database because of these user actions:

  1. If user clicks many times on the submit button,
  2. If API call take longer to complete execution and the user refresh the page

The question is how to prevent our application from storing duplicate post requests?

I am applying a solution for case one by disabling the submit button after a submit.

Please sign in or create an account to participate in this conversation.