Prevent automatic browser scroll on refresh
On Chrome, even if you force scrollTop to 0 it will jump afterwards after the first scroll event.
You should bind the scroll to this:
$(window).on('beforeunload', function() {
$(window).scrollTop(0);
});
So the browser is tricked to believe that it was on the beginning before the refresh.
To disable automatic scroll restoration just add this tag to head section.
<script>history.scrollRestoration = "manual"</script>
It's not supported by IE. Browser compatibility.