We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


Suggests for icon display

minnirok asked
Medium Priority
Last Modified: 2010-08-05

This is kind of a general question, I'm not sure how to start this. I'd like to provide the user with a list of icons they can choose to associate with some data.

So.. I'll probably have like 80 icons all together, each of which are 16x16 pixels, that's about 1kb each. That would be in total lets say safely 100kb - should I somehow make them download all the icons as soon as they visit my page - or is there some slick way to only transmit the icons they are trying to view?

Another point on that - what would be a good way to display so many icons? I was thinking a popup menu that had categories, and sub categories like:

    Icons -> Sports   -> baseball
                             -> hockey
                 Parties  -> birthday
                             -> office
                             -> holiday
                 Holidays -> xmas
                              -> halloween
                 Animals  -> etc

you get the idea. So if I do something like that, will I have to make sure all the icons are transmitted to the user at page load? Will a copy of the icons remain on their disk somehow so I won't have to keep sending them the whole icon batch everytime they visit?

Watch Question

Jason C. LevineDon't talk to me.

Hi minnirok,

It sounds like you will need some sort of way to save the user preferences, so you are looking at cookies, sessions, and a scripting language connecting to  MySQL.  

Depending on how complex you want to make this, you could load all of this into a small SQL table and display icons as the user browsers by doing queries...at 16k each, I wouldn't worry too much about bandwidth but if there is a way to limit how many display at a time, your users will appreciate it.


With the script here you preloading all the images into the browser's cache, if the cache hasn't been cleared (most people don't clear the cache on their browser unless they are having problems) the browser would probably reuse the same image without reloading them.





     "the browser would probably reuse the same image without reloading them."

How could I check if the browser is actually using the images from the cache instead of always asking from the server everytime the page is visited?
If it were really the case that it just uses the image from the cache, that would be perfect.

I would do a test with let say 5 images available, I would visit the page once, than I would change the images but with the same name,

i.e. pic1.gif, pic2.gif, pic3.gif etc. the first time

Then you use different pictures but with the same name.

Then you revisit the page if you still have the first set of image than the browser used the ones in the cache on refresh you should see the new set of image.

Actually I don't think you even have to use the preload script for that.


Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Thanks for the points and the grade.

Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.