Thursday, April 28, 2011

Tip of the Day

Avoid the animated GIF files in your HTML.

Yes. I mean it. Avoid the animated GIF files. Flash is OK, but can run pretty slowly. Animated GIF files don't run in most of the latest picture viewers today, and display as still images in the Canvas element. Instead, you may have to do the animation with JavaScript.

I should put a tutorial on my site on how to animate with JavaScript. I did say "JavaScript tutorials" in my metadata.

But I didn't say "avoid the GIF files", because those might still continue. They're just image files that support transparency, like PNG files. Yes, you can still use "still" GIF files (and you can still use animated GIF files in browsers, but I don't recommend it, obviously).

But I have to say that GIF animations may leave sometime. Flash, SVG, JavaScript, CSS3, SMIL, Multimedia, and the HTML5 Canvas element are all standards and better. You know what? Most of my games use animated GIF files. But I did that before I knew that they were usually browser-only supported.

Just a tip. And possibly useful.

No comments:

Post a Comment

Please keep your comments appropriate.