Skip to content

How to prevent user sending requests frequently?

I believe it can be done with a PHP controller or JS cookie manipulation.
Help me with logic. For example, I want a user to send a request once every 2 minutes.

Let’s pretend I’ve implemented some logic in the PHP controller and when I click the form Submit button in a custom product view tab, it says “You have already submitted a request in the past 2 minutes. Please try again later”

How can I tell that the request is not going through?

Where should I debug and look in the console?