Answers for "how to stop browser back js"

0

how to stop browser back js

history.pushState(null, null, null);
$(window).on("popstate", function (event) {
  if (!event.originalEvent.state) {
    history.pushState(null, null, null);
    return;
  }
});
Posted by: Guest on March-27-2021

Code answers related to "how to stop browser back js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language