title: Retain scrollbar position even after reloading using javascript
body: <p>I have requirement where if I click on a checkbox the value gets submitted and hence the page gets reloaded. Now, to click another checkbox, i need to scroll down again which is not a better idea. So, now I want to retain my scrollbar position even after page gets reloaded. Is there any method in javascript to do that? I have tried the below code, but there was no luck. </p>
  
  <pre><code>&lt;input type="checkbox" onclick="myFunction()"/&gt; One &lt;br/&gt;
  
  function myFunction() {
           document.body.scrollTop = 500px;
          }
  </code></pre>
  
  <p>I also browsed many websites but nothing worked for me.
  Please help me with this issue.</p>
  
  <p>Thanks.</p>