I am doing an online quiz application in PHP. I want to restrict the user from going back in an exam.
I have tried the following script, but it stops my timer.
history.pushState(null, null, location.href); window.onpopstate = function () { history.go(1); };