[Twisted-web] Off topic: streaming animated GIFs

Tommi Virtanen tv at twistedmatrix.com
Wed Dec 21 02:02:18 MST 2005


Mike Pelletier wrote:
> 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.

The standard trick is to make the containing html page (or iframe)
refresh itself every once in a while, to free the memory etc.

I've written a (prototype of a) video surveillance system long, long ago
in the era of Perl CGIs, with this basic architecture. It worked well
enough to never cause any negative feedback.

> 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.

For generic use, nevow.canvas, SVG+CSS+AJAX or XUL (nufox?) or something
like that sounds a lot better.



More information about the Twisted-web mailing list