Quick answer
If you're a developer, wrap your form handler with a debounce or disable the submit button on first click using JavaScript. If you're a user, clear your browser cache and disable extensions that modify forms or network requests.
Why does a browser send multiple requests on one click?
You're filling out a form, click submit, and suddenly the server receives two identical requests. Maybe you're seeing double charges, duplicate email sign-ups, or your app tries to process the same action twice. This isn't random. It happens because of one of three things: your browser re-sends the request due to a network timeout or redirect, your code (or a browser extension) triggers the click event more than once, or you've got a hardware or software issue causing a double-click.
From my years on the help desk, I've seen this most often with users who have a mouse with a worn-out switch—it physically sends two clicks. But it's also a common bug in web apps where developers forget to guard against double submission. The fix depends on which side you're on, and I'll cover both.
For users: fix the browser side
- Check your mouse or trackpad first. If you're on a desktop, plug in a different mouse and try again. If the problem disappears, your mouse is the culprit. On a laptop, try using the touchpad instead of an external mouse. A faulty mouse switch can send two clicks for every physical press.
- Disable browser extensions. Extensions that modify forms, autofill tools, or privacy blockers (like uBlock Origin or NoScript) can interfere and cause duplicate requests. In Chrome, go to
chrome://extensions, toggle off all extensions, then test. In Firefox, go toabout:addonsand disable them. If the issue stops, re-enable extensions one by one to find the offender. - Clear your browser cache. Old cached scripts can cause weird behavior. In Chrome, press
Ctrl+Shift+Delete(Windows) orCmd+Shift+Delete(Mac), choose 'Cached images and files', and click 'Clear data'. In Firefox, pressCtrl+Shift+Delete, select 'Cache', and clear. After clearing, reload the page—you should see the form load fresh. - Try a different browser. If you're using Chrome and the issue persists, open the same page in Firefox or Edge. If it works there, the problem is specific to your Chrome profile or installation. You can then create a new Chrome profile to isolate the issue.
- Reset your browser settings. This is a last resort because it wipes extensions and settings. In Chrome, go to
chrome://settings/resetand click 'Restore settings to their original defaults'. In Firefox, go toabout:supportand click 'Refresh Firefox'. After a reset, you'll lose saved passwords and bookmarks if you haven't synced them, so back up first.
For developers: fix the code
If you're the one building the site, the real fix is to prevent the double submission in your JavaScript. The simplest way is to disable the submit button on the first click. Here's a plain vanilla JavaScript example:
document.querySelector('form').addEventListener('submit', function(e) {
var btn = document.querySelector('button[type=submit]');
btn.disabled = true;
btn.textContent = 'Submitting...';
});After you add this, when the user clicks submit, the button becomes inactive and won't send another request. You'll see the button text change to 'Submitting...' immediately—that's your confirmation the code is working.
Another approach is to use a flag to block duplicate submissions:
let submitting = false;
form.addEventListener('submit', function(e) {
if (submitting) {
e.preventDefault();
return;
}
submitting = true;
// your AJAX or fetch goes here
});Server-side guard
Never rely only on client-side code. Add a token or ID to each form submission and check it on the server. In PHP, you can use a session token:
session_start();
if ($_POST['token'] !== $_SESSION['form_token']) {
die('Duplicate submission detected');
}
$_SESSION['form_token'] = uniqid();This way, even if the request is duplicated, the server rejects the second one. After implementing this, test by double-clicking the submit button. You should see the first request go through and the second one get an error or be ignored.
Alternative fixes if the main ones fail
- Update your browser. An outdated browser may have bugs in its network stack. Go to the official site and download the latest version. After updating, run the same test.
- Run a malware scan. Some adware or browser hijackers inject scripts that cause duplicate requests. Use Windows Defender or Malwarebytes to do a full scan.
- Check your network equipment. A faulty router or a flaky Wi-Fi connection can cause the browser to retry requests automatically. If you're on Wi-Fi, try wired Ethernet.
Prevention tips for the future
- For users: Keep your browser and extensions updated. If you have a mouse, test it periodically with a tool like DoubleClick Tester (free online). Replace the mouse if it fails.
- For developers: Always disable the submit button on click, and also add a server-side check. That covers 99% of duplicate submissions.
- For both: If you're dealing with a payment form, use a payment gateway that generates a unique order ID—they often have built-in protection against duplicate transactions.
That's it. Start with the mouse test—it's the fastest and most common cause for users. If you're a dev, add the button disable code and test with a double click. You'll see the duplicate request disappear.