2

Lets imagine we have to html sites:

- login
- register

I start at login and i navigate to register, so my history stack is now:

login -> register

What i now need is a JavaScript function to navigate back from register to login

login <- register

and delete the register history entry so that the user cant use forward to get back to the register site.

Is that even possible?

Mulgard
  • 8,785
  • 29
  • 120
  • 215

1 Answers1

0

When you leave the register page you could...

location.replace("/login");

... this should not add an item to the history - see: In Javascript, how do I "clear" the back (history -1)?.

Community
  • 1
  • 1
Billy Moon
  • 54,763
  • 23
  • 128
  • 231