Apple.com always display a standard image first and then use javascript to load a retina image if the device supports retina.
I wonder why apple don’t use CSS media query directly to reduce the HTTP requests?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Short answer — browser-prefetch.
There’s nothing that they can do, short of using JS to either:
The goal isn’t to reduce HTTP requests, here. The goal is to reduce concurrent HTTP requests, for data which is largely-redundant – even moreso if the browser doesn’t support the high-res version, but is forced to use that bandwidth, anyway.
Benefits of doing the JS thing:
Eventually, the
<picture>spec, in conjunction with thesrcset=andmedia=attributes of the<source>element, will allow for a JS-free method of allowing browsers to intelligently handle media, based on their own internal queries and page-profiling (eg: is the user on an LTE connection, or are they on 2G out in the hills, somewhere at the moment).