0

Possible Duplicate:
Prevent Back button from showing POST confirmation alert

I have used the history.back(1) function of javascript to redirect users to the previous page. I have linked this function to my back button. It works, but when I click the back button a JS alert warns:

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

I don't want to show this alert. How can I remove this alert or use another function that will not trigger this alert?

Community
  • 1
  • 1
tibin mathew
  • 2,058
  • 10
  • 41
  • 51

1 Answers1

0

Whenever you leave a page, store that link in some cookie. On target, instead of using history.back(1), use location.href=extractLinkFromCookie();.

function extractLinkFromCookie()
{
//some mechanism to read previous link from cookie
}
Farray
  • 8,290
  • 3
  • 33
  • 37
Praveen Prasad
  • 31,561
  • 18
  • 73
  • 106