0

I have code that blocks back button in the browser, however, it doesn't work,

function test (e) { if (performance.navigation.type == 2) { e.preventDefault(); } } 

Is there a solution that will work on major browsers, can anybody try to help me with this?

3
  • @Charlie, no, it doesn't work in the Chrome Commented Jul 22, 2021 at 11:04
  • 3
    Very annoying user experience doing this Commented Jul 22, 2021 at 11:06
  • stackoverflow.com/questions/59983529/… Duplicate Commented Jul 22, 2021 at 11:08

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.