title: Javascript back button not working properly -scrolling to the bottom of the page, instead of previous scroll location
body: <p>I'm using the following code on a wordpress website and it is only present on the post pages:</p>
  
  <pre><code>&lt;button onclick="history.back()"&gt;Back&lt;/button&gt;
  </code></pre>
  
  <p>What I would like the code to do is bring the user directly back to the spot where they left off on the previous page and for the most part the code is working fine.</p>
  
  <p><strong>Problem:</strong> After clicking forward and then clicking back a few times - the back button will continue to bring you back button, however not to the same scroll spot - it actually brings you back to the bottom of the webpage and will keep doing this every time until you leave the website and then return. </p>
  
  <p>Any help with this problem will be greatly appreciated. </p>
  
  <p>Here is my website address - if that helps >> <a href="http://rumpleskilton.com/djs-bands-singers/" rel="nofollow noreferrer">http://rumpleskilton.com/djs-bands-singers/</a></p>
  
  <p>(to see the problem - select one of the listings and then click the back button, which is just above the page header. It could take several times to see the problem. Just click a few of the listings.)</p>