In case you don't want to clear caches or history, you may try this developer way.
1️⃣ Press Ctrl + Shift + J (or Ctrl + Tab + C in some browsers) to open the Console in Developer Tools.
2️⃣ Click on the Console tab. You will see tons of errors and logs—never mind those!
3️⃣ Copy and paste the following code into the console and press Enter:
1️⃣ Prevent Page Reload
window.location.reload = [removed_js] {
console.log("Reload blocked!");
};
window.location.assign = [removed_js] {
console.log("Navigation blocked!");
};
window.location.replace = [removed_js] {
console.log("Navigation blocked!");
};
// 2️⃣ Prevent Refresh via Keyboard Shortcuts
document.addEventListener("keydown", [removed_js] {
if (event.key === "F5" || (event.ctrlKey && event.key === "r")) {
event.preventDefault();
console.log("Manual refresh blocked!");
}
});
// 3️⃣ Prevent Leaving the Page (Back/Forward Navigation)
window.onbeforeunload = [removed_js] {
event.preventDefault();
return "Are you sure you want to leave?";
};
// 4️⃣ Disable Console Logs to Prevent Tampering
console.log = [removed_js] {};
console.warn = [removed_js] {};
console.error = [removed_js] {};
console.debug = [removed_js] {};
Done! Now, the browser won't refresh, navigate away, or let you reload via shortcuts.
If you want to undo this, simply refresh the page manually or restart your browser.