1

When attempting to reload/refresh a page after a form has been submitted, this popup appears:

enter image description here

But it only has 2 options: continue or cancel. What if I want to reload, but NOT resubmit the form?

1

well, you can't really. This is all based on the way the site is coded. Even if you could do it, you would probably bork your session.

What you can sometimes do, is put your cursor in the browser address bar and hit enter. This will usually cause you to be redirected to another page however, if the site is well coded, and if not, will put your session with the server in an unstable state. Not really a situation you want to be in.

You are getting the message because your browser is sending a POST instead of a GET.

By default, a browser resends the state of the last command sent to the server, which in this case happens to be a POST, the result of which was a document; the very document you wish to reload.

This is common when multiple pages are linked together into a multi-step submission (a "wizard"). Preserving state information across multiple pages (like the billing address entered in step #2), requires things like cookies, server-side session memory, and form values.

The form values are the problem, as they are not submitted on a GET, so that information would be lost if you refreshed the page with a GET, instead of a POST containing the information necessary to generate the page you have loaded (or are being set on the server side in the session's memory).

There are two general problems with posting a form a second time. The first danger is that processing has already happened on the server, and requesting that processing be performed again would be bad (like ordering the same item twice).

The second is that data may be being accumulated on the server side as the result of your posts, and you may duplicate that data. this is akin to adding an item to your cart once, but finding that there are two instances of it. Because this happened abnormally, outside the expected flow of the application, the developer may not be able to account for the abnormal state of the data, causing either a failure of some kind, or performing an action more times than are desirable.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.