News for hackers. Stuff that matters.
Re:Goodbye to Painful Image Loads on Small Devices by sp332 on Friday May 31, 2013 @09:49AM (#5798549)
So, for larger screens, there would be many requests for a single image?

The demo page doesn't seem to work that way. In fact, if you resize the window gradually, it won't load new images at all. You have to wait for a second after resizing for it to bother loading the new image.

Re:Goodbye to Painful Image Loads on Small Devices by uptown on Friday May 31, 2013 @10:48AM (#5798918)
If you take a look at the Foundation source, the Interchange event responsible for swapping in/out images is setup with a 50 millisecond throttle. That's probably why you're seeing a slight delay. Additionally, they seem to also cache previously-loaded images to speed up future replacements.

From a practical standpoint, this is designed to address device-specific uses where the screen-width is less-likely to experience size-adjustments than a desktop browser, so you'll probably see the initial HTTP request for the small-resolution image, followed by the HTTP request for the appropriately-sized image for whatever device/screen you're using, and you're less-likely to see the same number of requests made while wildly resizing a demo page.

Re:Goodbye to Painful Image Loads on Small Devices by disbelief on Friday May 31, 2013 @09:55AM (#5798579)
I see! So maybe it decides which media-query it should be using and then makes the one necessary request?
Re:Goodbye to Painful Image Loads on Small Devices by smileyj68 on Friday May 31, 2013 @11:15AM (#5799079)
Correct.