Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How much more efficient is one big image rather than many small images. Facebook style

Tags:

html

css

facebook

So I was looking at the facebook HTML with firebug, and I chanced upon this image and came to the conclusion that facebook uses this large image (with tricky image positioning code) rather than many small ones for its graphical elements. Is this more efficient than storing many small images?

Can anybody give any clues as to why facebook would do this.

like image 858
Jesse Gibbs Avatar asked Aug 26 '09 12:08

Jesse Gibbs


1 Answers

These are called CSS sprites, and yes, they're more efficient - the user only has to download one file, which reduces the number of HTTP requests to load the page. See this page for more info.

like image 61
ceejayoz Avatar answered Sep 19 '22 05:09

ceejayoz