0

Is there a way to prevent browsers from jumping to other pages.

I am developing a program. I want users to use the address bar to jump with my consent. If not, I will stop the jump.

Is this possible?

I need your advice. Thank you very much

YYC
  • 11
  • 1
  • 3
  • No, this is not possible. Ultimately the browsers belong to the users, so they can do what they want. – Pointy Mar 23 '20 at 03:47
  • You could probably run a script using the onunload event. I'm not sure I'd recommend it, because it is really annoying the user, though. – JeffryHouser Mar 23 '20 at 03:58
  • If you want to display a warning or similar before jumping to another page, you could use onclick functions on all of your links, display a popup with a message, and an "abort" and "continue'" button, and then redirect the user if she clicks continue. Have a look at this: https://stackoverflow.com/questions/1119289/how-to-show-the-are-you-sure-you-want-to-navigate-away-from-this-page-when-ch – John Mar 23 '20 at 05:02

0 Answers0