system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5:Why do Webpages "Bounce" back up to the top when loading the last few images when I have already scrolled down?

I will connect to a webpage that has loaded text but is still trying to load some pages or video. I have scrolled down to read something, and when the images or video finally loads, I am shot right back up to the top of the page. What is happening here?
gpt
In JavaScript you can set the "focus" to be on any specific item on the page. It's likely that the focus is set to something at the top of the page. Javascript can be told to run after the page finishes loading, which is why it will wait until after images load. May be more noticeable on mobile since slower download speeds and smaller screen space.