g r o t t o 1 1

Peeve Farm
Breeding peeves for show, not just to keep as pets
  Blog \Blôg\, n. [Jrg, fr. Jrg. "Web-log".
     See {Blogger, BlogSpot, LiveJournal}.]
     A stream-of-consciousness Web journal, containing
     links, commentary, and pointless drivel.


On My Blog Menu:

InstaPundit
USS Clueless
James Lileks
Little Green Footballs
As the Apple Turns
Entropicana
Cold Fury
Capitalist Lion
Red Letter Day
Eric S. Raymond
Tal G in Jerusalem
Secular Islam
Aziz Poonawalla
Corsair the Rational Pirate
.clue

« ? Blogging Brians # »





Book Plug:

Buy it and I get
money. I think.
BSD Mall




 10/6/2003 -  10/8/2003
 9/29/2003 -  10/5/2003
 9/22/2003 -  9/28/2003
 9/15/2003 -  9/21/2003
  9/8/2003 -  9/14/2003
  9/1/2003 -   9/7/2003
 8/25/2003 -  8/31/2003
 8/18/2003 -  8/24/2003
 8/11/2003 -  8/17/2003
  8/4/2003 -  8/10/2003
 7/28/2003 -   8/3/2003
 7/21/2003 -  7/27/2003
 7/14/2003 -  7/20/2003
  7/7/2003 -  7/13/2003
 6/30/2003 -   7/6/2003
 6/23/2003 -  6/29/2003
 6/16/2003 -  6/22/2003
  6/9/2003 -  6/15/2003
  6/2/2003 -   6/8/2003
 5/26/2003 -   6/1/2003
 5/19/2003 -  5/25/2003
 5/12/2003 -  5/18/2003
  5/5/2003 -  5/11/2003
 4/28/2003 -   5/4/2003
 4/21/2003 -  4/27/2003
 4/14/2003 -  4/20/2003
  4/7/2003 -  4/13/2003
 3/31/2003 -   4/6/2003
 3/24/2003 -  3/30/2003
 3/17/2003 -  3/23/2003
 3/10/2003 -  3/16/2003
  3/3/2003 -   3/9/2003
 2/24/2003 -   3/2/2003
 2/17/2003 -  2/23/2003
 2/10/2003 -  2/16/2003
  2/3/2003 -   2/9/2003
 1/27/2003 -   2/2/2003
 1/20/2003 -  1/26/2003
 1/13/2003 -  1/19/2003
  1/6/2003 -  1/12/2003
12/30/2002 -   1/5/2003
12/23/2002 - 12/29/2002
12/16/2002 - 12/22/2002
 12/9/2002 - 12/15/2002
 12/2/2002 -  12/8/2002
11/25/2002 -  12/1/2002
11/18/2002 - 11/24/2002
11/11/2002 - 11/17/2002
 11/4/2002 - 11/10/2002
10/28/2002 -  11/3/2002
10/21/2002 - 10/27/2002
10/14/2002 - 10/20/2002
 10/7/2002 - 10/13/2002
 9/30/2002 -  10/6/2002
 9/23/2002 -  9/29/2002
 9/16/2002 -  9/22/2002
  9/9/2002 -  9/15/2002
  9/2/2002 -   9/8/2002
 8/26/2002 -   9/1/2002
 8/19/2002 -  8/25/2002
 8/12/2002 -  8/18/2002
  8/5/2002 -  8/11/2002
 7/29/2002 -   8/4/2002
 7/22/2002 -  7/28/2002
 7/15/2002 -  7/21/2002
  7/8/2002 -  7/14/2002
  7/1/2002 -   7/7/2002
 6/24/2002 -  6/30/2002
 6/17/2002 -  6/23/2002
 6/10/2002 -  6/16/2002
  6/3/2002 -   6/9/2002
 5/27/2002 -   6/2/2002
 5/20/2002 -  5/26/2002
 5/13/2002 -  5/19/2002
  5/6/2002 -  5/12/2002
 4/29/2002 -   5/5/2002
 4/22/2002 -  4/28/2002
 4/15/2002 -  4/21/2002
  4/8/2002 -  4/14/2002
  4/1/2002 -   4/7/2002
 3/25/2002 -  3/31/2002
 3/18/2002 -  3/24/2002
 3/11/2002 -  3/17/2002
  3/4/2002 -  3/10/2002
 2/25/2002 -   3/3/2002
 2/18/2002 -  2/24/2002
 2/11/2002 -  2/17/2002
  2/4/2002 -  2/10/2002
 1/28/2002 -   2/3/2002
 1/21/2002 -  1/27/2002
 1/14/2002 -  1/20/2002
  1/7/2002 -  1/13/2002
12/31/2001 -   1/6/2002
12/24/2001 - 12/30/2001
12/17/2001 - 12/23/2001
Monday, February 3, 2003
22:37 - Ah, the mysteries of life
http://brainstorminterlude.2y.net:8409/~uec/cgi-bin/viewgallery.pl?gallery=maltplant

(top) link
Okay-- Safari question. Any web geeks out there using Safari, who might be able to suggest an insight into this?

Go to this URL; watch the image as it loads. Namely, note that it loads as a thumbnail-- about 200 pixels across. Then, as soon as it's fully downloaded, the image expands to its full natural size, re-rendering the page around it.

Why does it do this? What controls it? Is it simply that the image is large in dimensions and has no WIDTH and HEIGHT tags, and this is how Safari handles such things? The final result is a properly-rendered page, but what's the purpose of rendering the image scaled-down while it's loading?

I'm having a hard time deciding whether this is a cool and clever feature, or a bizarre and stupid bug. I'm leaning toward the former, as it's just a behavior quirk and causes no actual incorrect rendering in the end. But-- I'd love to know just what's going on.

UPDATE: Several people have e-mailed to the effect that some apps (such as Photoshop) save JPEGs with a smaller, "low-res" version of the image encapsulated within them. The idea is that the browser can load the small version first, quickly, and then load the high-res version on top of it. It's sort of like progressive JPEG functionality, especially if the browser HTML-scales the thumbnail up to the full dimensional size of the high-res image while it's loading.

Now, the high-res image is only stored in the file linearly after the low-res image, so the browser won't know the high-res image's dimensions until it's finished loading the low-res image; so it would have to do pretty much what Safari's doing, which is to load the small one at its native, small size, and then have it "pop" to the full size of the high-res version once that's loaded. But what I'm still confused about is that the small version doesn't appear to load any more quickly than the high-res version does. It loads linearly, top-to-bottom, as though it's loading a high-res JPEG that's been HTML-scaled down. As a matter of fact, what it looks to be doing is the following:
  • Open image, find a low-res thumbnail version with small dimensions embedded at the top of the image
  • Lay out the page according to the thumbnail image's dimensions
  • By now, the thumbnail version is fully loaded, and Safari finds a high-res version in the file; however, rather than simply displaying the completed low-res version in the position that's laid out for it, Safari starts actually reading (and displaying line-by-line) the hi-res version, and HTML-scaling it to fit into the space that's been laid out for the low-res version.
  • Finally, once the high-res version has been fully loaded, Safari re-renders the page layout according to the high-res version's dimensions.
If this is what's going on, then it's not a pure bug I'm seeing, but a nifty feature with a bug. What Safari probably should be doing is displaying the low-res image in its small laid-out space, and only popping to the full-size image after the JPEG has been fully loaded. Alternately, it could pop to the high-res version's full dimensions as soon as it begins reading the high-res version, but display the completed low-res version at the high-res version's size, which would make for a different kind of "progressive" behavior-- big and chunky at first, but snapping into better focus as the data loads (and meanwhile, being laid-out in the format that it would end up in).


Back to Top


© Brian Tiemann