I have been having the issue that when I refresh after adding a product to cart, submitting contact form, or submitting payment, that the action will be repeated as described in this popup message:

The page that you’re looking for used information that you entered. Returning to that page might cause any action you took to be repeated. Do you want to continue?

How may I fix this as it is a problem being an e-commerce.

Hi,

I think this message is from the browser, and it will display anytime you try to refresh a page that was displayed as the result of a POST request. To prevent this from happening, make sure all POST requests redirect to a different screen.

Best regards,

Nélio

That happens with every form that you post on every site. That’s why browsers pop up with that message. It’s not something only on your site, or on WordPress, it’s every site out there.

Solution

But you want to disable that feature for some reason know what happens if you do.

Consider you are buying an item for 200$, and you hit refresh accidentally, if there is no confirmation dialog box, you will be paying for the same item twice...

but you still want to disable that feature then I would recommend reading this article on confirm form resubmission. The article clearly tells why you shouldn’t disable it and how to disable it. Look for Method 3.

Solution

Thanks both.


And Kyle your answer helped me.