Win a copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Sprites on High Traffic websites

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys, do you explain in the book a nice solution about how to divide sprite images?

I mean, I use sprites on my site (http://www.nextt.com.br - if you are redirected to nextt.com.br/en remove the /en sufix couse it is not translated yet :p ).
I started using 1 sprite image for all the site, but it got too big (I feared some parts of the site stayed blank becouse the image is downloading).
Then i splited that image on contexts (images of the banners of the home, little (20px or 24px) icons, vertical gradient backgrounds and clients logos).

The clients logo are used only in one page, so makes sense to let them separated from the others.
But 90% of the other images are used on the home page.
Should I keep them splited or should i gather them in one image?

Is there a technique for handling with sprites and taking these decisions?
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Filipi Zimermann wrote:Guys, do you explain in the book a nice solution about how to divide sprite images?

I mean, I use sprites on my site (http://www.nextt.com.br - if you are redirected to nextt.com.br/en remove the /en sufix couse it is not translated yet :p ).
I started using 1 sprite image for all the site, but it got too big (I feared some parts of the site stayed blank becouse the image is downloading).
Then i splited that image on contexts (images of the banners of the home, little (20px or 24px) icons, vertical gradient backgrounds and clients logos).

The clients logo are used only in one page, so makes sense to let them separated from the others.
But 90% of the other images are used on the home page.
Should I keep them splited or should i gather them in one image?

Is there a technique for handling with sprites and taking these decisions?


hello......
More the no of images more the no of http requests and the by reducing efficiency of web page.
I would suggest you to use sprites.Use multiple sprites instead of 1.
 
author
Posts: 16
Firefox Browser Safari Chrome
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Opinions are divided on the use of sprites.

For mobile devices, you should use sprites as much as possible. However, they should be sensible. Don't load lots of sections that you are only going to need on a few pages – have a global sprite sheet for all pages, and individual "feature" sprite sheets.

For desktop devices, I am (personally) of the opinion that sprites can quickly becomes too difficult to manage. I believe that you should use them for multiple states of things like buttons, or for images that you would typically have to preload or risk having to wait for the image to download (or face a website that feels unresponsive). While it is definitely true that less HTTP requests is usually more important than filesize, don't go so far that you create something that is a nightmare to maintain or pass on.

We deal with this in the book, yes.

I hope this is helpful.
 
Something must be done about this. Let's start by reading this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!