Here is my code. Is there any way to make my javascript time wont reset when the user refreshes the browser ? 
function startTimer(duration, display) {
        var timer = duration,
            minutes, seconds;
        setInterval(function() {
            minutes = parseInt(timer / 60, 10);
            seconds = parseInt(timer % 60, 10);
            minutes = minutes < 10 ? "0" + minutes : minutes;
            seconds = seconds < 10 ? "0" + seconds : seconds;
            display.textContent = minutes + ":" + seconds;
            if (--timer < 0) {
                document.getElementById("testik4").submit();
            }
        }, 1000);
    }
    window.onload = function() {
        var fiveMinutes = 60 * 18,
            display = document.querySelector('#time');
        startTimer(fiveMinutes, display);
    };<span id="time"></span> 
     
     
    