Stop Chrome's Confirm Form Resubmission page on your site
ERR_
When Chrome shows the resubmission page
Going back to a POST result
A visitor submits a form, gets the result page your server returned directly, moves on and then presses Back. The only way to rebuild that page is to send the form again.
The result page wasn't saved
Chrome shows the page only when it has no usable copy of the result in its cache. A result sent with Cache-Control: no-store is never kept, so Back lands here every time.
Reloading the result page
Pressing Reload on a POST result brings up a dialog with the same Confirm Form Resubmission title instead of the full error page.
Other cache reads that fail
Outside of form posts, the same code means Chrome couldn't read a page it expected to find in its cache, and the page says the site can't be loaded from the cache.
Chromium's localized_
Check how your form handler answers
# Send a test POST to the form handler on a staging copy, since this really submits the form
curl -sS -o /dev/null -D - -d 'name=test' https://staging.yoursite.com/contact \
| grep -i -E '^(http|location)'
Read the response
A handler that follows the pattern answers with status 303 and a location header pointing at the result page, so the output looks like HTTP/2 303 followed by location: /contact/thanks. A 302 also works, since browsers switch it to GET, as the Fetch standard requires and RFC 9110 allows for historical reasons, but 303 says so outright. A 307 or 308 keeps the POST, so it doesn't help. A 200 means the handler returns the result page itself, and that page is the one Back and Reload will ask to resubmit. MDN's 303 page describes this use: the redirect sends the browser on to a confirmation page that it fetches with GET.
How to stop the resubmission page
- Redirect after every successful POSTProcess the form, then answer with 303 See Other and a Location header for the result page. The browser follows it with a GET, and that GET is what lands in the history.
- Carry the result in the URL or sessionThe result page can no longer read the posted data, so pass an order number in its URL or keep a short confirmation message in the session.
- Redirect after errors tooFor a form with validation errors, store the errors and entered values in the session and redirect back to the form, so a failed attempt leaves no POST result behind either.
- Use GET for forms that only readSearch boxes and filters change nothing on the server, so give them method GET. Their results can be reloaded, bookmarked and revisited without any prompt.
Frequently asked questions
Is it safe for visitors to resend the form?
It repeats whatever the form did. Chrome's page tells visitors to press Reload to resubmit the data, and its warning says doing so repeats any action the page performed, such as placing an order twice. If your handler can't tell a repeat from a new submission, a visitor who resends creates a duplicate. Chromium's error page strings hold both messages.
Can caching headers fix it instead?
Caching can let Back show a saved copy of the result, but only while Chrome still holds that copy, and a page with personal details is often one you'd rather not have stored. The redirect takes the POST out of the history, so Back has nothing to resubmit.