0

I am using window.history.back() to navigate to a previous page inside my application.

However I have lot of cases like the following

A-->B-->B(postback)

in which i do post back inside the same page. For this case window.history.back() is not useful since it keeps going to the same page B until there are no postback navigations in history.

Is there some known and secure way of dealing with this situation?

jesantana
  • 1,241
  • 2
  • 14
  • 27
  • 1
    Don't use that javascript method and implement a proper button to return to previous view, as explained [here](http://stackoverflow.com/questions/24202285/navigate-to-previous-page-with-jsf) – Aritz Jun 18 '14 at 11:00

1 Answers1

0

You should use window.history.go(). just use a hidden field to counter your post and finally navigate that number and use .go() function.

Robert
  • 5,278
  • 43
  • 65
  • 115