Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If a page has multiple facebook/twitter buttons for multiple stories (24 buttons for 24 stories), its creating 24 files for fb likes and 24 folders for twitter where count is saved. This is making the page heavy unnecessarily. Can we store it in single file? Please help.

share|improve this question

You need to start using css sprits, this allows you to load one image file and with css display only the section of the image that you need.

img.home {
    background:url(img_navsprites.gif) 0 0;

In the example above you see that starting at position 0x0 in the image we display a rectangle 46px x 44px.

share|improve this answer
You should not use or link to w3schools. It's not a reliable source of information and we don't want to encourage its use. I recommend using the Mozilla Developer Network instead. (But +1 for a good answer nonetheless). – John Conde Aug 19 '13 at 22:10
Good point @JohnConde, I've changed the reference. – Daniël W. Crompton Aug 19 '13 at 22:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.