I have integrated the Countdown.js API into my JavaScript file, utilizing a variable called timer.
var countDownCompleted = false;
var myCountdownTest = new Countdown({
time: timer,
width: 200,
height: 80,
onComplete: countdownComplete,
rangeHi: "minute"
});
function countdownComplete() {
countDownCompleted = true;
window.location.href = 'index.php';
}
How can I make sure that the countdown does not reset when the page is reloaded? I am unsure about how to implement session storage.