This isn't really a PHP question. Except that's what I code in now.
On a typical discussion forum (phpBB, phorum or any one of a hundred others) let's say there is a long discussion thread going with 20 or more comments to the original post, and where each such comment includes one or more photos, perhaps 700 pixels wide. That's a lot of bandwidth.
I just emptied my Firefox cache and looked at just such a thread. And yet it loaded quickly. If I scroll all the way down to the bottom of the thread (which appears as if it were one loooooooong HTML page) there are close to 40 big photos on display. However, because these are big images the browser display can only show one or two such images at a time.
So I'm assuming (am I right?) the browser only downloads the images one or two at a time, as the viewport requires. How does that work? Does this require something special done in the server-side PHP? Browser-side Ajax (I doubt that......many of these forums preceded Ajax)?
Or does the browser download ALL of the HTML, all at once, but then makes secondary GETs one or two at a time, in order to display images? And if so, how does the browser know which images are currently scrolled to the browser's viewport?
What am I missing?