how to stop browser back js history.pushState code example
Example: 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;
}
});