开发者

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 subm开发者_开发技巧itting 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 :)


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜