At Open Force 2009 this past November, I attended a presentation by Kevin Schreiner (DotNetNuke on Speed and Performance) that spoke in part about the use of Sprites. What on earth are sprites? Well I had heard of the term sprites in relation to Computer Graphic programing, but not when it came to Web sites and DotNetNuke in particular.
So what are Sprites in terms of a Web site? They present a way to reduce traffic between the server and the client. Specifically, a sprite will contain a collection of images in one file, that can be reference to supply various graphic elements on a page. Since only one image file is required, the site will load faster. Additionally, since one image is used, less memory is used by the browser to render the page.
How is this done? Well, after I had seen the presentation, I understood the concepts, but had yet to put into practice as I had no real need. So it took me until now to sit down a try to use sprites. Read on to see a simple example using sprites.