title: local storage items after refresh page
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  &lt;button onclick="myFunction();"&gt;Fav Number&lt;/button&gt;
  &lt;div id="result"&gt;&lt;/div&gt;
    &lt;!--This code works on chrome--&gt;
  
  &lt;script&gt;
  function myFunction() {
  // Check browser support
  if (typeof(Storage) !== "undefined") {
      // Store
   var a = prompt("fav number");
      localStorage.setItem("lastname", a);
      // Retrieve
      document.getElementById("result").innerHTML = localStorage.getItem("lastname");
  } else {
      document.getElementById("result").innerHTML = "Sorry, your browser does not support Web Storage...";
  }
  }
  &lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>hello,</p>
  
  <p>is it possible to get local storage items back when you refresh the page?
  and if so, how? </p>
  
  <p>Thanks</p>
  
  <p>Dylan,</p>