2

Whenever browser back is clicked, it must not navigate to the previous page but to some default page. how is it done using JSF ?

BalusC
  • 992,635
  • 352
  • 3,478
  • 3,452

1 Answers1

7

Clicking on browser back button requests the result page from the browser cache. This is a client side activity. It doesn't send request to your server for fetching some default page(in your case).

Please refer this post for writing a filter indicating the browser not to cache dynamic JSF pages.

And also you can refer this one for more details.

You can try to detect if User has clicked on browser back button by writing client side code.

Refer this post for detecting back button click.

If you are trying to alter the behaviour of browser back button, it indicates some kind of flaw in your application.

Community
  • 1
  • 1
Vikas V
  • 3,128
  • 2
  • 30
  • 59