0

I'm trying to do an app where onclick on home button it comes to home page,but i want to make browser back button invisible or in hidden state using javascript .Is there any way to do that.

AKSHATHA V
  • 69
  • 1
  • 2
  • 12

1 Answers1

0

window.onbeforeunload = function() { return "Your work will be lost."; };

will at least provide a warning, but it is not guaranteed because all browsers behave differently.

More information can be found here, how to stop browser back button using javascript