3 ms·
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 gradual
by sp332 13y ago
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.
- disbelief 13y agoI see! So maybe it decides which media-query it should be using and then makes the one necessary request?
- smileyj68 13y agoCorrect.
- uptown 13y agoIf 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.