4 ms·
Except for IE, modern browsers support srcset, which allows you to define different image sizes for different screen sizes, and only the "right" size image will
by eric_bullington 11y ago
Except for IE, modern browsers support srcset, which allows you to define different image sizes for different screen sizes, and only the "right" size image will be downloaded.
If you need to support IE, you can use media queries with CSS background images. Typically, it's only background images that are bandwidth hogs anyway -- logos and such tend to be much smaller.
Media queries are supported by all modern browsers, including IE9+, and with a JS polyfill (respond.js), you can even support IE 6-8. So there's really no excuse for anyone who's supporting retina not to use media queries to minimize bandwidth for everyone else. It's only a few extra lines of CSS, and you can target any imaginable screen size (e.g., see this gist: https://gist.github.com/antonioreyna/5809553 https://gist.github.com/antonioreyna/5809553)
- gotchange 11y agoBased on Caniuse[0] data, it looks like that «srcset» is not supported on pre Lollipop stock browser on Android devices. So, it is still not a feasible solution. [0]: http://caniuse.com/#feat=srcset http://caniuse.com/#feat=srcset