Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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;
  }
});
 
PREVIOUS NEXT
Tagged: #stop #browser #js
ADD COMMENT
Topic
Name
6+7 =