dotMobimobiThinkingmobiForgemobiReadyDeviceAtlasgoMobi

Posted by jonat 3 years 4 weeks ago

pic
 jonat
mobiForge Newbie
Posts: 2
Joined: 3 years ago
[offline]

Hi,

I wonder if I should Sprite my images when developping for mobile phone. If I sprite, I will only ask to the server to send me one file... It will be faster to get one big file the many small... .I don't want many many images.. let say I have 3 small images... Is sprite those images will be usefull?

So... what do you think?

Jonat

Posted by ruadhan 3 years ago

pic
 ruadhan
dotMobi logo
Mobile Champion
Posts: 707
Joined: 5 years ago
[offline]

Hi,

It makes sense I suppose, since HTTP requests are expensive. Having said this though, most devices will download a number of things in parallel, so if you have a very low number of resources in your page, maybe it wont make too much of a difference.

I would be more worried about scrolling the master image reliably on different phones - many of them will probably not position the sprites correctly. Have you tried it yet? I suppose it depends on how well supported CSS is across the client devices.

Ruadhan O'Donoghue
dotMobi

Posted by tomomi 3 years ago

pic
 tomomi
mobiForge Newbie
Posts: 7
Joined: 3 years ago
[offline]

Hi,
I've done some testing with sprite images with various devices/browsers.

Surely spriting images optimize your webpage and gives better performance, but be sure which devices you are targeting.
Spriting works fine only on decent browsers such as WebKit and MS IE, but as long as I have found, there are some limitations on Nokia's Webkit and new Blackberry browser (4.7, I think) so you need to use with caution!

So I'd say, go ahead and try it if your audiences are all using iPhone, Android, some new HTC, BB Storm etc.

hope it helped,
Tomomi

===========================
Tomomi
GirlieMac! http://girliemac.com/blog

Posted by daniel.hunt 3 years ago

pic
 daniel.hunt
dotMobi logo
Mobile Grandmaster
Posts: 230
Joined: 4 years ago
[offline]

Honestly, I'd be wary of using sprites on mobile devices. At least until I could reliably test the memory impact that it would have.
ie: Would loading the same large image 20 times, be more (or less) efficient than 20 small ones?
The time to load would certainly be longer, but would the memory impact be higher or smaller? Remember, we're talking about handheld devices here, not desktop PCs!

Daniel Hunt
dotMobi