Prevent "Confirm Form Resubmission" when pressing back button after incorrect login

I am using Yii 2 Advanced and when I type incorrect login details, I get “Incorrect login details” alert message. But when I click back button, I get " Confirm Form Resubmission" box in chrome. How can I prevent ? I want to show same error message when user goes back.

When you get the message, after user click the alert redirect to the same page to clear stuffs.
But why is that a problem? If user needs to go to some page then after alert redirect to that page

I am surprised you get that error. I just tried hitting the back button after unsuccessful login and all I get is the login form again - without the error this time as is understandable now that you are back to where you started. Also, why would anyone ever hit the back button after an incorrect login attempt??? And to @evstevemd’s point, why does that matter?