magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1997 > 09 > Programming with Perl  

Double the Fun

A few months ago, I taught a Perl class at Digital Ink, producers of www.washingtonpost.com. While exploring the site, I stumbled across an interesting image feature: When the page loaded, a rather large, but fast-loading, black-and-white GIF of the image appeared immediately. Then, slowly, the color would magically appear!

I was charmed, and wondered how I could do that. I decided not to look at the source of the page, but to try to figure it out on my own. The basic mechanism I devised is the topic of this month's column.

I guessed that the image wasn't really a single image, but two images, fed into the browser by server push (or "server animation push"). In other words, a special MIME type causes the browser to keep reading multiple versions for the same URL.

I implemented this, but unfortunately, my prototype wouldn't cacheýwhen I returned to the site later, I once again saw the black-and-white preview GIF before reloading the real image. This is unsatisfactory for long-term or heavily used sites.

I investigated further, and discovered that to achieve caching, Digital Ink used the Netscape-proprietary LOWSRC option to the <IMG> tag. This method is clearly superior, as far as server load and user bandwidth are concerned. My script is slightly more portable, however, and there are lessons to be learned from its basic techniquesýso, onward to



  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2