On the real estate website I work for, I have a Contact Us form on the Property Details page, on which the user can click the Contact Us button, which will load the form in a modal dialog box, iframe will load contact us forms, fill in some details and send them.
As soon as the form is processed on the server side, I have to emit JavaScript code from the server, which calls the dialog closing method, and then redirects the user to the thank you page (if I did a simple redirect on the server, iframe would get a thank you page that I donβt want) .
The problem is in Chrome: if you click the "Back in browser" button, the contact form will be quietly re-submitted.
Note. IE and Firefox do not have this problem at all.
I found the following links useful, but not the answer to my problem:
We tried various methods to get around the problem in Chrome, as hidden fields, the insured cache is disabled, destroy the iframe before redirecting to the thank you page. Nothing saves re-submitting the form without even asking if you want to resend it (no need to resend it)
source share