13

Hey I am getting this confirmation by firefox.

To display this page, Firefox must send information that will repeat any action
(such as a search or order confirmation) that was performed earlier.

Anybody knows what is this confirmation for?

And how to get rid out of this?

Mohammad Faisal
  • 5,783
  • 15
  • 70
  • 117
Ashwini Agarwal
  • 4,828
  • 2
  • 42
  • 59

9 Answers9

14

Try to change your request type from POST to GET.

If not possible to change the request type, For reloading the page, try using:

window.location=window.location;

Instead of

window.location.reload();

As suggested in answer to the question preventing firefox reload confirmation

Worked very well in Firefox, Chrome..

Community
  • 1
  • 1
Nitin
  • 187
  • 1
  • 6
10

This happens when you refresh a page that is the result of a POST request (as opposed to a GET request).

To avoid it, you can use the POST/redirect/GET pattern.

AndreKR
  • 32,613
  • 18
  • 106
  • 168
4

I had this issue on a website I made. I ended up doing all of the backend work, then using this code:

header("Location: webpage.php", true, 303);

This clears out any post data and redirects the page so reloading will not cause that message anymore.

Skunkman
  • 211
  • 1
  • 2
1

This is happening when you refresh a page to which some POST data was sent (for example, when you have completed a form). This question is asking you if you want to re-send that data so, if you made a search the searched term will be sent again to the server. This is dangerous when you completed a form where you have ordering something, so refreshing the page and resending the data will make a new order in that site.

ov1d1u
  • 958
  • 1
  • 17
  • 38
0

Changed the method request type from POST to GET in my search form and got rid of the confirmation box..

Lucky
  • 16,787
  • 19
  • 117
  • 151
0

replace the existing code "top.location.reload() " with code "top.location.href=top.location.href" https://support.mozilla.org/en-US/questions/695164

Renars Sirotins
  • 176
  • 3
  • 5
0

The way Firefox is giving warning ; saying you're re-submitting form with post method.

below workaround worked for me.

<form id="yourDummyform" method="post" action="yourPostActionURL?var1=val1&var2=val2">

<!--or some hidden variables here -->

</form>

on Success of ajax call or some event do

$("#yourDummyform").submit();
Chirag
  • 1,478
  • 16
  • 20
0

I have overcome this problem for my requirement like this. I have added following code after form submit

document.getElementById("frmtbl").submit();
document.getElementById("nxt").click();
document.getElementById("frst").click();

nxt and frst are links for next and first page on the navigation bar. Others may get clue.

0

Sounds like the request to the page was from a POST.

You should use the Post/Redirect/Get pattern.

alex
  • 479,566
  • 201
  • 878
  • 984