gciochina
gciochina

Reputation: 1201

Animations: CSS3 or GIF?

I'm working on a client-side web app that is meant to run on an iPad 1.

Besides the fact, that the framework I'm using is slow-as-a-snail (not my choice), the app is making a lot of calls to the server. Right now i'm working on a "Loading..." screen. My question is:

Should I use CSS3 animations or simple GIF animations? Which one is faster?

Upvotes: 3

Views: 1310

Answers (2)

Ry-
Ry-

Reputation: 224867

In my experience on iPhones and iPod Touches (not iPads, but I take it they'll probably be about the same), GIFs are several orders of magnitude slower in animation than CSS animations, transitions, or what have you. I think their framerate is deliberately slowed, maybe to save battery life.

Upvotes: 2

calebds
calebds

Reputation: 26228

the app is making a lot of calls to the server

Using GIF animations would require another call to the server to fetch the image. If the implementation times are comparable, using CSS3 seems more appropriate; it would likely take fewer bytes, and ride along with your existing CSS file.


A more pragmatic answer is that it doesn't matter, for a simple animation the speed difference is negligable. And if your app already requires a loading screen, why worry about how long the loading screen takes to load?

Upvotes: 2

Related Questions