Welcome to WebmasterWorld Guest from

Forum Moderators: incrediBILL

Message Too Old, No Replies

Jpegs download out of turn!

How do we make them download in the order that HTML lists them?



4:24 pm on Jul 15, 2001 (gmt 0)

10+ Year Member

Here's an aggravation that has me puzzled:

When I create a photo gallery of say 12 jpegs, I like to display them all on one page since each jpeg is only about 30kb (384x256). This works great even on a slow connection, because while the surfer is admiring the 1st couple images, the other ones are downloading beneath the fold; so when he scrolls to the next couple images, they've had time to download so he doesn't have to wait for them.

OK, here's the problem: The jpegs don't always download & display in the SAME ORDER that's listed in the html file. Sometimes I have them in a large table with several cells; other times I DON'T use tables and just have them all listed with IMG tags inside the body. But the problem still occurs, and there's nothing else happening on the page--just plain HTML.

So... A surfer might see the 1st image, then perhaps sit there waiting for the 2nd image to display, while simultaneously, ALL THE OTHER jpegs are displaying beneath the fold, and the damn 2nd jpeg on TOP of the page only displays after most of the others are done.

This happens sporadically; it's usually unpredictable as to which image may download "out of turn." Although sometimes I've noticed a pattern.

I'd be very appreciative of any help that would keep my layout scheme intact. I ususally use tables, but as I said, this problem occurs even on occasions when I don't use them.



10:57 pm on Jul 15, 2001 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

I don't know of any way around this, short of putting all the images into one big image file with lots of white space. The factors that control the order of image loading are many.

One is that each browser renders a page (especially tables) differently.

Second, as you know, you are talking about a pretty big total page weight for the web — 360 kb or more in images alone. This means there will be many different data packets, each of which may get bounced around the internet differently, each packet therefore taking relatively longer or shorter than others to arrive at the client machine.

And third, depending on the specific server and its load in the moment, its response to the various image hits will vary.

You may get improved results by breaking the layout table into two tables, where the second table starts below the fold. But it still won't be a constant and dependable thing.


12:52 pm on Jul 17, 2001 (gmt 0)

10+ Year Member


Thanks for the insight!

I'm going to experiment with a couple more tables as you suggested.



Featured Threads

Hot Threads This Week

Hot Threads This Month