title: Javascript Timer should go on after Web Browser is closed
body: <p>I have written the following code for a Javascript timer with a few validations.</p>
  
  <pre><code>function timedcounter(){
      time=time+1;
      t = setTimeout(function(){ timedcounter() }, 1000);
      display(time);
  }
  
  function starttimer() {
      var autotask=document.getElementById("Tasks").value
  
      if(autotask=="") {
          $("#errormsg2").show();
      } else {
          if(!timer_is_on){
              add_row_flag=1;
              var value=document.getElementById("startstopbutton").value
              if(value=="Start") {
                  timer_is_on=1;
                  value="Stop";
                  document.getElementById("startstopbutton").innerHTML="Stop"
                  $("#errormsg2").hide();
                  timedcounter();
              }
          } else {
              add_row_flag=0;
              stoptimer();
          }
      }
  }
  
  
  
  function stoptimer(){
      clearTimeout(t);
      timer_is_on=0;
      document.getElementById("startstopbutton").innerHTML="Start"
      document.getElementById("disptime").value=null;
  
      finaltime(time);
      time=-1;
  }
  </code></pre>
  
  <p>I wanted to know is there any way to keep the timer going even after the user closes the browser, as in when he reopens the webpage timer should show the time elapsed since he started the timer. </p>