Re: [csswg-drafts] [css-mediaqueries] Proposal: "prefers-reduced-data"

The Working Group just discussed `prefers-reducued-data MQ`.

<details><summary>The full IRC log of that discussion</summary>
&lt;heycam> Topic: prefers-reducued-data MQ<br>
&lt;heycam> github: https://github.com/w3c/csswg-drafts/issues/2370<br>
&lt;heycam> florian: I don't know for sure in which browser but I suspect in chrome, which has a new HTTP header which they can send if the user requested so<br>
&lt;heycam> ... which informs the web server that you would prefer lightweight content<br>
&lt;heycam> ... there has been a suggestion to have a MQ to match that<br>
&lt;heycam> ... in the same circumstances, the page author would also know that the user may be directly / through some heuristic, prefers some lightweight content<br>
&lt;heycam> ... images as a bg instead of a video, e.g.<br>
&lt;heycam> ... seems reasonable to me<br>
&lt;heycam> myles: how does chrome know when to send the header?<br>
&lt;heycam> philipwalton: I think it's from the OS on Android<br>
&lt;heycam> iank_: there's a setting Chrome, prefer lightweight data, then we send everything through potentially an HTTP proxy<br>
&lt;heycam> ... few other things as well<br>
&lt;heycam> florian: is it user triggered<br>
&lt;heycam> iank_: yes<br>
&lt;heycam> ... but I'm not sure, might be varied on country basis<br>
&lt;heycam> ... we run HTTP proxies where we'll send traffic through that, then do a bunch of compression for the user<br>
&lt;heycam> myles: so the proxy might turn on the header?<br>
&lt;heycam> iank_: no<br>
&lt;heycam> ... the proxy is one of the side effects from turning on this option<br>
&lt;heycam> ... and I think the bit of information that we give devs is on navigator.connection.saveData<br>
&lt;heycam> philipwalton: it's a client hints header, in the clients hint spec<br>
&lt;heycam> florian: somebody proposed to detect this via MQ<br>
&lt;heycam> fantasai: seems reasonable to me<br>
&lt;heycam> astearns: is that header, are there plans for other browsers to implement this?<br>
&lt;heycam> fantasai: wht values does the header have?<br>
&lt;heycam> philipwalton: I think it's just a boolean at this point<br>
&lt;heycam> ... but the spec is written in a way that it could apply additional values<br>
&lt;heycam> fantasai: I can imagine wanting three levels, i don't care, I would prefer if you didn't give me heavy things, I'm on a metered / dialup connection<br>
&lt;astearns> http://httpwg.org/http-extensions/client-hints.html#save-data<br>
&lt;heycam> iank_: quickly looking through the additional things we expose, we also give as headers (what we think is the effective) roundtrip time<br>
&lt;heycam> ... an estimate of the downlink speed<br>
&lt;heycam> philipwalton: and effective connection type<br>
&lt;heycam> heycam: mobile vs fixed?<br>
&lt;heycam> iank_: 3g, 4g, slow 2g, ....<br>
&lt;heycam> florian: don't think we'd expose all that<br>
&lt;heycam> ... via the MQ<br>
&lt;heycam> ... having something that can be used in a  boolean context, where one case is no preference, and may have other "yes please" levels<br>
&lt;heycam> iank_: one thing I'd like to see here is use cases for where it's used in CSS<br>
&lt;heycam> florian: use image bg instead of video bg<br>
&lt;heycam> iank_: do that with script<br>
&lt;heycam> philipwalton: 1x vs 2x?<br>
&lt;heycam> florian: browser should do that already<br>
&lt;heycam> [side discussion about font-display:optional]<br>
&lt;heycam> philipwalton: with save data, 1x vs 2x, could be your device supports 2x but you only want a smaller version of the image<br>
&lt;heycam> florian: mostly you should not be using resolution MQ feature, but instead srcset<br>
&lt;heycam> ... then the load data preference could influence that<br>
&lt;heycam> s/srcset/image-set/<br>
&lt;heycam> myles: maybe terribly idea, can we extend that mechanism to allow switching between videos and images as backgrounds, instead of a MQ?<br>
&lt;heycam> fantasai: MQs are not only used in CSS<br>
&lt;heycam> emilio: responsive images<br>
&lt;heycam> iank_: I'm not saying no, but I want to see web developer demand for this<br>
&lt;heycam> astearns: that's the general tone I'm hearing<br>
&lt;heycam> ... sounds like it could be useful, but we'd need to have it motivated by use cases and I'd prefer to see this client hint get a bit farther on the track<br>
&lt;heycam> florian: sounds ok<br>
&lt;heycam> koji: this is an Android OS setting<br>
&lt;heycam> ericwilligers: it's both Android and a Chrome setting<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2370#issuecomment-402373927 using your GitHub account

Received on Wednesday, 4 July 2018 06:12:02 UTC