tags:

views:

16

answers:

2

I have a footer link "Privacy Policy" in my application. When user clicks this link we display some information on the page along with a "Back" link.

Now requirement is when user click on the Back link I need to display the previous page from which he had opened Privacy policy page.

For example

  • User is on page A clicks "Privacy Policy" and then when he clicks "Back" we should display page A agian.
  • If he clicks "Privacy Policy" from page B then when he clicks "Back" we should display page B.

We can use JavaScript to do this but we are not supposed to use JavaScript. Can anyone help me on this?

+1  A: 

You can pass an URL parameter to your "Privacy Policy" link telling what is the current page. Then, you will use it as the outcome of "Back".

Jaú
+1  A: 

Use javascript (history.go(-1)) - JSF uses a great amount of javascript already so don't worry.

Bozho