<body>
<div style="height: 2000px;"></div>
<script>
history.back();
window.onbeforeunload = function() {
history.replaceState({foo:'bar'}, null, "#");
window.scrollTo(0, 1000);
}
</script>
</body>
<body>
<div style="height: 2000px;"></div>
<script>
history.back();
window.onbeforeunload = function() {
history.replaceState({foo:'bar'}, null, "#");
window.scrollTo(0, 1000);
}
</script>
</body>