3 ms·
All the code I've seen for content images involves some JavaScript stuff that uses the device pixel ratio as well.
by karlshea 14y ago
All the code I've seen for content images involves some JavaScript stuff that uses the device pixel ratio as well.
- WiseWeasel 14y agoThe server should not have to decide which image to send, based on whatever it can gather of a combination of various factors, including device display resolution capability (double-density vs regular pixel mapping) and connection quality (wireless vs broadband) or whatever else comes into play. The server should be advertising the capability of high res images and the user agent should be requesting them if it wants.
- karlshea 14y agoThat's a great idea, but that's not currently how it works. All of the high-res website image stuff that I've seen all uses client-side JavaScript to fetch the 2x images.
- WiseWeasel 14y agoYeah, that's just a broken way to go about it. We need to put pressure on browser maintainers to fix it. I feel dirty doing a hack like that.