how to disable back js code example
Example: how to disable back js
history.pushState(null, null, null);
$(window).on("popstate", function (event) {
if (!event.originalEvent.state) {
history.pushState(null, null, null);
return;
}
});
history.pushState(null, null, null);
$(window).on("popstate", function (event) {
if (!event.originalEvent.state) {
history.pushState(null, null, null);
return;
}
});