How to prevent page refresh?

  • 0
    Hello!
    There is a SPA, when the page is refreshed, the session is reset and goes to the login page.

    How to prevent page refresh?
    And is it possible without a warning window that changes on the page may not be saved. Appears when forbidden with


    Disabling F5 and Ctrl + R is not enough as you can refresh the mouse context menu and mouse gestures.
    JavaScript Genevieve Rodgers, Apr 28, 2020

  • 1 Answers
  • 0
    Prohibit is impossible. If I understand the essence of your task correctly, then use HistotyAPI .
    Anonymous

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!