Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Allowing users to Refresh browser without the "Confirm Form Resubmission" pop-up

Tags:

http

php

I have a login system, and while logged in, if I refresh the browser, Chrome shows a pop up window titled "Confirm Form Resubmission." I assume that the same thing would happen with other browsers.

How can I allow the browser to be refreshed without this confirmation pop-up window? Of course, I would also like to stay logged in while refreshing the browser.

like image 762
John Avatar asked Mar 10 '10 05:03

John


People also ask

How do I stop resubmission popup confirmation?

Solution 1: Disable Confirm Form Resubmission From Chrome Follow these steps below to disable the confirm resubmission feature from chrome, if you're windows user; Right click on your chorme shortcut, select properties. In the target field, add: “-disable-prompt-on-repost” without the quotes after chrome.exe.

What technique is used to help with form resubmission error?

What can pass as a solution to rectifying the Confirm Form Resubmission error is switching the POST method to the entire PRG pattern. Whenever any page needs a form on it, design it in such a way that it does not post the data directly to the server.

How do I stop a form from submitting when I refresh the page?

Unset Form Data One way to stop page resubmission on page refresh is to unset the form data after it is submitted so that the variable storing form data becomes empty and wrap up your form processing block of codes to check if the form is empty.

How do I stop resubmit from refreshing in asp net?

As you probably know, ASP.NET Web Forms send POST requests back to the server and then re-render the Page in the same request. This is why we see the form re-submission message when we click "reload". To avoid this issue, we should employ the post-then-redirect pattern used by many web applications.


1 Answers

After processing the POST page, redirect the user to the same page.

On http://test.com/test.php

header('Location: http://test.com/test.php');

This will get rid of the box, as refreshing the page will not resubmit the data.

like image 155
Tyler Carter Avatar answered Sep 29 '22 03:09

Tyler Carter