Nuno Cunha
Nuno Cunha

Reputation: 1

How to disable IE message for reference information with JavaScript?

How to disable IE (browsers) message for reference information with JavaScript?

this is the situation:

I have a form that i submit, after submitting i reload the page and appears the following message :

"To display this page Firefox has to resend information that will repeat previous actions (such as a demand or confirmation of an order)."

i need help...

Thanks

ps: sorry I'm not English :)

Upvotes: 0

Views: 341

Answers (2)

Brandon
Brandon

Reputation: 69963

Take a look at the POST/Redirect/GET pattern.

Upvotes: 2

SLaks
SLaks

Reputation: 887245

This message appears whenever you reload a page that was received from an HTTP POST.
It appears because HTTP POSTs are intended to be non-repeatable.
For example, if you buy something online, the website will usually send an HTTP POST to its server saying that you spent X dollars. Without that warning, it would be possible for Firefox or IE to automatically reload the page, sending a second HTTP POST. This would tell the server that you spent X dollars a second time, and would make you very angry. Therefore, the browsers have that warning.

To get rid of it, change your page to an HTTP GET.

For example:

<form method="GET">

Alternatively, you can keep it an HTTP POST, and have the server send a redirect in response to the POST, telling the browser to send an HTTP GET to a separate page. This means that you don't have the risk of sending the request twice, as I described above.

Upvotes: 1

Related Questions