I am creating an online exam page for my project. I have a countdown timer, but it resets on page refresh. How can I make it not to reset? The timer is set by fetching time from
When the user starts the exam, save the start time in the database. Use that for everything. Don't rely on client side code for this as the user can easily modify it.
If you save the start time, you know when the user started and what the current time is. You can use that to see if time is up or not. A javascript timer is good to show how much time is remaining, but it should be getting that info from the database.