title: How to store a variable in local storage?
body: <p>I am running a script and I am using a <code>meta refresh</code> as it could stop due to internet connection or server downtimes or anything:</p>
  
  <pre><code>&lt;meta http-equiv="refresh" content="30"&gt;
  </code></pre>
  
  <p>The script requires a starting variable, this will update every time the scripts runs, so I want to save the latest value for that variable in local storage but by putting it this way, the value will always be overwritten to the starting value</p>
  
  <pre><code>var myId = 47911111;
  localStorage.setItem('titles', myId);
  </code></pre>