JPEG Animation Example

There are four main alternatives for doing animations on the web:

  1. Java - heavy artillery. Ultimate flexibility, but overkill for most applications.
  2. Shockwave. Also very flexible, but requires that the user install a plugin.
  3. Animated GIFs. Can be either looped or one-shot. Main disadvantage is that GIFs are about ten times bigger than JPEGs for photographic images.
  4. Server push. Can use JPEG or GIF or even a mix of the two. Disadvantage: if you want the animation to loop, you have to keep downloading it forever, a big bandwidth waste. Also: Netscape doesn't cache the file, it must have some special exception for multipart MIME types. But external web caches such as Squid do cache it if it's cachable.

This page demonstrates how you can put a one-shot JPEG server push into a single file, instead of having to run a CGI script to assemble it at runtime from multiple files. It's just a simple matter of setting the MIME type.

Fetch the script.

Netscape's server push page (second half).
Back to ACME Labs.