title: Load back to homepage on refresh
body: <p>I have a single page website. If click one of the navbar tabs, lets say 'contact us' the site will scroll down to the contact section. The problem is, if I refresh the site now it will automatically scroll down to the contact section each time. I want the site to scroll to the top of the page every time I refresh. The reason this is happening is because the address bar is changed to <strong>...index.html#contact-area</strong>. </p>
  
  <p>I tried the code below but the site gets caught in an infinite refresh loop.</p>
  
  <pre><code>&lt;script&gt;
          window.location.replace("index.html");
  &lt;/script&gt;
  </code></pre>
  
  <p>I also tried the following but it doesn't work. It starts to scroll up then stops.</p>
  
  <pre><code>&lt;script&gt;
          window.onbeforeunload = function () {
          window.scrollTo(0, 0);
          }
  &lt;/script&gt;
  
  </code></pre>