title: Reset scroll position on page refresh, did't work on modern browsers
body: <p>I'm trying to reset browser scroll position on refresh and apparently it didn't work or ain't possible with modern browsers, am I wrong?</p>
  
  <p>The code:</p>
  
  <pre><code>$(window).on('beforeunload', function() {
  $('html, body').scrollTop($('#scroll-to-div-id-anchor').offset().top); });
  </code></pre>
  
  <p>Maybe I'm handling this incorrectly and there is another way to achieve that?</p>
  
  <p>I tried all variations and possible options to this code, but it didn't work on Safari and Chrome (both on desktop and, especially - mobile).  </p>