title: Click Counter for HTML Button
body: <p>I'm trying to find a way to track how many times a button has been pressed on a website.</p>
  
  <p>It's working so far, but it resets every time when user refreshes the website. </p>
  
  <p>Is there a way to prevent it from resetting? </p>
  
  <p>Here's what I have:</p>
  
  <pre><code>&lt;button onclick="Test()" id="counter"&gt;Check&lt;/button&gt;
  &lt;p&gt;This program has been run &lt;span id="displayCount"&gt;0&lt;/span&gt; times.&lt;/p&gt;
  
  &lt;script type="text/javascript"&gt;
        var count = 0;
        var button = document.getElementById("counter");
        var display = document.getElementById("displayCount");
  
        button.onclick = function(){
          Test()
          count++;
          display.innerHTML = count;
        }
      &lt;/script&gt;
  </code></pre>