How to avoid having to scroll on Safari?

For those wondering, I found the answer here.

This code snippet:

<script>
    function scrollToBottom() {
        window.scrollTo(0, document.body.scrollHeight);
    }
    history.scrollRestoration = "manual";
    window.onload = scrollToBottom;
</script>
1 Like