Hacker News new | ask | show | jobs
by tiddchristopher 5413 days ago
I can't tell whether you're suggesting a solution or taking a guess as to what Muse did. I think it's the latter. Sorry if I interpreted your question incorrectly. :)

They're using a hidden div full of <img> elements to load the hover images before they're requested by an actual hover. It's all the way at the bottom of their code code: <div class="preload_images"> [Removed for brevity] </div>

Sprite sheets are another option (using the sliding doors technique), but they're a bit more ungainly. They would save a couple HTTP requests, but that extent of optimization isn't necessary on most sites. Unless I've already combined all my stylesheets into one file, I certainly wouldn't start combining images.

What really matters is perceptible lag to a user, and either technique work just as well for that.

I find Adobe's technique kind of neat, and I'll probably use it in some of my future websites.

2 comments

The windowing technique isn't ungainly when its done automatically for you a la SpriteMapper :)

http://yostudios.github.com/Spritemapper/

Or you could inject them into the Dom so they load, but don't exist anywhere on the page..