News for hackers. Stuff that matters.
Re:How to think about HTML responsive images by Lorin on Tuesday April 09, 2024 @02:34AM (#39976687)
I have no idea why browsers moved away from providing the DPR (device pixel ratio) header on media requests so one could continue using the sensible and simple <img> whilst the server could return the correct images on its own.

Would love to know the rationale.

Re:How to think about HTML responsive images by danburzo on Tuesday April 09, 2024 @02:50AM (#39976762)
I haven’t followed Client Hints closely, but a change[1] in RFC 9842 internal drafts “removed specific features to be defined in other specifications”, and the `DPR` header ended up as `Sec-CH-DPR` in the nascent Responsive Images Client Hints spec[2].

[1] https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cli... [2] https://wicg.github.io/responsive-image-client-hints/#sec-ch...

Re:How to think about HTML responsive images by omnimus on Tuesday April 09, 2024 @03:20AM (#39976922)
Isnt it same reason why using srcset device ratio is not recommended and you should use widths. Sending DPR in header is kinda useless and maybe hurts privacy/fingerprinting?
Re:How to think about HTML responsive images by javman on Tuesday April 09, 2024 @02:51AM (#39976770)
The server doesn't know what size the image will be displayed, but the browser does.
Re:How to think about HTML responsive images by globular-toast on Tuesday April 09, 2024 @03:48AM (#39977060)
Doesn't work for static sites. At one point it seemed like home computers would be going away and everyone would just use small, thin clients with most of the "work" done on servers. I'm glad this hasn't happened. I prefer the idea of a static site where the user's browser makes all the decisions.
Re:How to think about HTML responsive images by falcor84 on Tuesday April 09, 2024 @08:38AM (#39978762)
I'm not sure, but my understanding was that this is to reduce browser fingerprinting.
Re:How to think about HTML responsive images by csnover on Tuesday April 09, 2024 @12:28PM (#39981100)
This doesn’t make sense to me. You can perform the exact same fingerprinting by looking at which image in a srcset is being requested.