0
Javascript Time Counter not reset on refresh
How to make javascript time counter that can't reset on refresh/reload a page? What the best practice for it if I want to using on CBT/Test application?
3 odpowiedzi
+ 5
In this case you can use localStorage to store counter just before unload using
https://www.w3schools.com/jsref/event_onunload.asp
And upon refresh you can again fetch the value from localStorage.
+ 3
What do you mean by time counter ??
0
Sorry if my question make you confuse, i mean is countdown timer. In example, if i have a test that limited to 10 minutes, during the test if user refreshing the page/browser, timer continues countdown from last value before user refreshing page (ex: when user refresh page after 5 minute, the counter will started from 5 minute, not from initial value/ 10 minute again)