Reputation: 23500
Is there a way (using javascript or other means) to suppress the form resubmission dialog that pops up when a page containing post data is refreshed?
Upvotes: 2
Views: 1067
Reputation: 42140
This is a common problem and the solution has a name: PRG
The page that receives the POST handles it and then redirects the client/browser to another page which is retrieved with a GET request. So if the client refreshes, they are not re-POSTing the data.
Upvotes: 2
Reputation: 2249
The popup shows before the content is loaded. So any Javascript will be executed after you clicked one of the buttons on the popup.
What you can do on the server side is redirecting to another page (with no POST data) after completing all your actions with the data.
Upvotes: 2