I have a quiz appearing website where a user can appear for quiz. It has a feature of time out and auto submitting of quiz if time exceeds 30 minutes. Now the user who attempts the quiz is trying to stop the page processing when time-out occurs and stops the page loading by clicking the X
button in browser. How can this be prevented. I have seen results for disabling refresh
button and all but this is not my case. The user is stopping the page load when auto submit is being done and the result is being processed. Can I have some insights on this.
$pageWasRefreshed = isset($_SERVER['HTTP_CACHE_CONTROL']) && $_SERVER['HTTP_CACHE_CONTROL'] === 'max-age=0';
if($pageWasRefreshed ) {
echo "<script>window.location.href='dashboard.php'</script>";die;
}
the above sent code is not of use.