Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Callum Anderson
8,837 PointsWhen would you use a sprite map?
In this example, I'd say it isn't worthwhile using a sprite map as the difference in load times is negligible. How often are they used in the "real world"?
I'd hazard a guess at the use of sprite maps being mainly on sites with large amounts of data on a single page, most likely in tabular format?
1 Answer
Michael Hulet
47,913 PointsI use them whenever I can to save HTTP requests, including on my super basic website. The icons for the various social networks I link to are all on a single spritesheet, courtesy of Compass
Callum Anderson
8,837 PointsCallum Anderson
8,837 PointsThanks, but that doesn't really answer why you use them. On your basic website, the image is the biggest bottleneck so the sprite map seems irrelevant. That's not to say it shouldn't be used if it reduces the load by a fraction of a second.
It just occurred to me that sprite maps would help reduce load on the web server, when multiple users are browsing the site concurrently. Perhaps that's another consideration.