-
Notifications
You must be signed in to change notification settings - Fork 756
Closed
Description
Would CSSWG consider this proposal of detecting exposing if the Save-Data request header from the Client Hint HTTP extension is on/off to allow for usage with CSS?
The Save-Data HTTP request header:
...a signal indicating explicit user opt-in into a reduced data usage mode on the client, and when communicated to origins allows them to deliver alternate content honoring such preference - e.g. smaller image and video resources, alternate markup...
- http://httpwg.org/http-extensions/client-hints.html#save-data
Example model
The 'prefers-reduced-data' feature:
| Name: | For: | Value: | Type: |
|---|---|---|---|
prefers-reduced-data |
@media |
no-preference | reduce |
discrete |
Example usage:
.image {
background-image: url("image/heavy.jpg");
}
@media (prefers-reduced-data: reduce) {
/* Save-Data: On */
.image {
background-image: url("image/light.webp");
}
}
Relevant articles, including use cases:
Dan503, davidmurdoch, nhoizey, gulshansainis, vanntile and 17 more