Community Page
- paulmwatson.com/journal Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- Make songbird look like spotify: http://addons.songbirdnest.com/addon/1440
- Got it, thanks Paul!
- Email me your email address so I can invite you Mike (paul@paulmwatson.com)
- Happy New Year to you, as well! I was stopping by to see if you would be willing to lend a reader a Spotify invitation. I am desperately hoping to be able try out the service. Thanks! Mike
- Nice one Jamie. Even more ironic is that that "mass production" is probably still underpaid, underage workers in some 3rd world country sweat-shop.
Jump to original thread »
Image concatenation has been around for awhile now but it is nice to have a fully explained article aimed at how to use the technique in web interfaces.
My question though is; favicons. Those annoying 16×16 icons browsers show in the address bar and next to bookmarks.
They are wonde ... Continue reading »
My question though is; favicons. Those annoying 16×16 icons browsers show in the address bar and next to bookmarks.
They are wonde ... Continue reading »
2 years ago
Are you thinking that it'd be groovy if you could store the favicon in the same image as other icons on the page? 'Cause i gotta say, that sounds like just a maintenance nightmare...
2 years ago
The interface lists many other websites and we want to show the favicon of each of those websites next to the title.
There can be up to 300 on one page though and that makes for a slow load time for the page as it makes 300 image requests. If I could route it through our server as a few single concactenated favicon images it would be better.
2 years ago
So you could do server-side concatenation of the favicons, generate CSS to display them at the same time, and send one moderately-sized image and one .css file down instead of 300 tiny images.
I like it... :-D
2 years ago
Of course, if it's *always the same 300 icons*, you can ask the browser to cache the concatenated image as well, and you're really ahead of the game. But assuming that isn't likely, the next best thing is probably to estimate a "sweet-spot" - how many images are likely to stay the same between each request? If users are generally viewing the same sites, this is probably fairly high - say 80%, or 240 images. Now, if you could group images into smaller sets based on their probability of being displayed, you can still generate the CSS and the images in a particular strip together, cache them server- and browser-side, relying on the browser pulling in however many sets are needed. The sets should be large enough to reduce the total number of requests, but small enough that it won't be too onerous if the browser has to pull down a few more than what would be optimal (total number of icons > 300).
I suspect you could come up with a formula for this, though i'm not seeing it right now.
Just when i think you're being utterly dull, you surprise me with an interesting little puzzle like this... :-)
2 years ago
So you'd want to go with full-color. You could be talking 100KB for a full set of 300 images, maybe a little less, but probably in that ballpark. You'd *definitely* want to cache that somehow.
2 years ago
Plenty of good points in there, Shog. It gets even more complicated because some favicons aren't 16x16. Salon's (http://salon.com/favicon.ico) is 32x32 and you do get better. Thankfully the interface is geared to only display 16x6, so we can scale it on the server.
Also this is for a feed reader interface and most people don't change their subscriptions too wildly.
Still, thinking about it more, I'm not sure there is a sweet spot and even if there was I'm not sure it would make it easy for the client-side CSS to display it correctly. You'd end up with a dynamically generated CSS file with 300 entries.
hmmm.
I think going back and changing the original problem is best. Displaying 300 favicons is stupid. At most 10-20 will be displayed on a screen at once with the rest hidden by foldering or scrolling mechanisms. They can load when needed, not on page load.
hmmm. Might work.
(16x16 annoyances they are.)
2 years ago
#BC7DDA8826EF4c0b8F452622B8B6C8CF { background: url(iconset1.png) -128 0; }
...for each icon. And it could probably be shorter. But even then, for 300 entries you'd have only about 22KB of CSS, which isn't even as bad as it sounds since if you want 300 images you'd have to associate them in *some* way anyhow, and it's not gonna get much more concise.
Of course, you're right - you're not gonna have 300 icons on-screen at once, and a reasonable browser is gonna load the ones on-screen first - so you'll benefit from intelligent loading *and* caching browser-side.
Still, an interesting little problem.