I often have sprites that are 800px or even more, I usually use 100px in
between the images.
But I think there's a limit on earlier versions of Opera that dont take
images bigger than 2000px (not sure at all might be more). So I generally
use 2 or 3 sprites if they get big, I still save a lot of requests.
Even with the spacing between the pictures, the file is often smaller, and
decreases loading time a lot, especially where the ping is really high;
where I live it's about 140ms.
Another thing you can do is cache all the images, so that it doesn't create
a new request when someboy visits the website again.
Here's an example for a htaccess file.
<FilesMatch "\.(jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=1200000, public"
</FilesMatch>
1200000 seconds is 2 weeks. So if images change the visitor might not see
before another 2 weeks.
If doing updates just change the file name then it will work.
Cheers,
Johan
[EMAIL PROTECTED]
2008/11/24 tee <[EMAIL PROTECTED]>
> I am trying to optimize a site, though the file sizes of the overall images
> aren't so much of a problem but the http requests. So I am attempting to
> put 10 icons in one gif file, the individual icon size is merely 600b and
> the dimension is 18px by 12px.
>
> I made a 18px by 150px to hold 10 icons vertically, that makes the size a
> mere 4kb, problem is, there is no width declared in the list element that
> the icon is declared as background image, so when I make the font size
> bigger, the 2nd icon in the vertically order see through; one more
> increasement, I can see the 3rd and half of the 4th icons. so I estimate I
> have to give a least 80px space in height to prevent this from happening, by
> doing so, the file size is double.
>
> I guess this is alright as it reduces 9 http requests, but for other big
> images, I estimate I might have to make the height over 1500px to solve the
> problem that occurs when font size increases. I guess this is a twofold
> question: 1) How do you do to prevent the above issue from happening, if
> possible?; 2) Does this method really justify the reduces of http requests?
>
>
> Thanks!
>
> tee
>
>
> *******************************************************************
> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
> Help: [EMAIL PROTECTED]
> *******************************************************************
>
>
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************