Wait, did I read that second one right? A streaming gif that is created/updated in real time by the server (i.e. the later frames don't even exist as the browser starts loading the asset)? What a hack!
Example project: https://github.com/videlalvaro/gifsockets