I am creating a online quiz where i am running clock, when user click refresh it reset the clock, so any suggestion will be welcome.
Any option to disable redirection or on redirection submit button should get clicked.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Vinay SinghRank #604 · 4K reputationPosted Jun 23, 2016, 12:08 AM EDT
Click Here...
$(document).ready(function() {
function disableBack() { window.history.forward() }
window.onload = disableBack();
window.onpageshow = function(evt) { if (evt.persisted) disableBack() }
});
Vincent Maverick DuranoRank #238 · 10.3K reputationPosted Jun 28, 2016, 8:55 AM EDT
However, you could probably force the cache to expire to disable the browser back button or you could try using this JavaScript hack to prevent browsing back here:http://www.aspsnippets.com/Articles/Disable-Browser-Back-Button-Functionality-using-JavaScript.aspx