views:

93

answers:

3

I have a site that has a large menu and each item on the menu has an icon. I have been looking into implementing a CSS sprite to speed it up, but I am wondering what the performance gain will be. My site is not open to the public so the users will almost always be repeat, so is it worth implementing or should I just rely on caching?

+2  A: 

Unless your site has heavy non-repeat traffic, there probably won't be much of a noticeable performance gain at all. Are you currently having performance problems? If not, there's probably no need to prematurely optimize such a relatively minor thing.

Chad Birch
I would like to reduce load times for people accessing our site from outside NA. Its not unbearable slow but there is a noticeable performance difference.
Andrew Clark
You stated that almost all of the visitors are repeat though. Switching to sprites only reduces the number of HTTP requests, but if they already have all the icons cached, this won't speed things up at all.
Chad Birch
A: 

How sure are you that, in the future, portions of the site won't be

  • Made public
  • Expand the private audience
  • Get new menus

All of those are reasons you may want to consider doing this up-front. I don't know your situation, but for some developers the first two items might be implemented suddenly as a business decision, and the programmer never even hears about it a manager comes back later asking for a way to improve performance on the site. Or maybe it never even gets that far: maybe the site loses users because of slowness and management never hears about it either.

Now, since you already have code that works I wouldn't worry about it too much. But when putting sites together initially it's something to remember.

Joel Coehoorn
A: 

I think that the major question you should be asking, is are your users pleased with the responsiveness of the site. If they aren't, and there isn't a greater underlying problem causing this, then you might use this change.

There's a nice article on the topic at List Apart http://www.alistapart.com/articles/sprites/

Dana the Sane