Magento 2 : Confirm Form Resubmission Error in Controller
-
28-03-2021 - |
Solution
in php we use POST and GET method for submit data
if we use POST method then form data will be submit in Form data parameter when you come back from browser that time it will not call your controller for Action directly submit form Again based on Form data parameter so you will get Error like
Confirm Form Resubmission
Suggest you to use GET method insted of POST so your data will be keep data in URL so does't submit form on back.
Please Refer https://stackoverflow.com/questions/6833914/how-to-prevent-the-confirm-form-resubmission-dialog for more details.
Please not :- There are some disadvantage of GET method please read and take care of it.
OTHER TIPS
This isn't Magento causing an error, rather your browser (Chrome) warning you that you are resubmitting the exact same data in a (POST) request. Firefox does the same:
It's not isolated to Magento sites either, any site that you press the browser back button in after making a POST request will warn you of the same.