JS
(quick examples)
“IF HIT BACK, FORCE FORWARD” history.pushState(null, null, location.href); window.onpopstate = () => history.go(1);
NO COMING BACK TO THIS PAGE function noBack() { history.forward(); } noBack(); window.onload = noBack; window.onpageshow = evt => { if (evt.persisted) { noBack(); }}; window.onunload = () => null;
window.addEventListener("pageshow", evt => { if (evt.persisted && !document.cookie. match(/COOKIE/)) { location.reload(); } });
window.onbeforeunload = () => "Are you sure!?";