-2

In my MERN project I don't want to let user go back in browser from a specific page. I have seen some same issues on stack overflow but couldn't get help.

Please help me. Thank you.

  • Does this answer your question? [Disable browser's back button](https://stackoverflow.com/questions/961188/disable-browsers-back-button) – Emiel Zuurbier Sep 12 '22 at 19:26

1 Answers1

-1

have you tried this?

<script type="text/javascript">
    window.history.forward();
    function noBack() {
        window.history.forward();
    }
</script>
crazy cat
  • 1
  • 2
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 16 '22 at 11:21