Answers for "how to stop browser back js history.pushState"

0

how to stop browser back js history.pushState

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 history.pushState"

Code answers related to "Javascript"

Browse Popular Code Answers by Language