[Twisted-web] Off topic: streaming animated GIFs

Mike Pelletier mike at mkp.ca
Tue Dec 20 13:07:49 MST 2005


On Sun December 18 2005 04:22, Tommi Virtanen wrote:
> the old school
> way is to have the bar graph as a GIF with more than one frame, and
> stream the frames whenever you want to update the picture; that keeps
> a single connection open to the server, pushing more data exactly when
> you want to. Of course, it is limited to updating 1-4 GIF images.

This is a really great idea!  Are there any gotchas that should be mentioned?  
Does the GIF header not specify the number of frames?  And even if the GIF 
isn't looped, would browsers be smart enough to discard data from previous 
frames?  It seems like it might cause what would effectively be a memory leak 
on the browser.

Just wondering whether this is suitable to be applied whenever you wished you 
could just write to a frame buffer on a client, or if it should be used 
sparringly for brief special effects.

Mike.



More information about the Twisted-web mailing list