Intent to Ship: saveData attribute in Network Information API

86 views
Skip to first unread message

Ben Greenstein

unread,
Dec 4, 2017, 4:42:29 PM12/4/17
to blink-dev

Contact emails

be...@chromium.org

tba...@chromium.org


Explainer

https://github.com/WICG/netinfo/issues/42


Spec

https://wicg.github.io/netinfo/#-dfn-savedata-dfn-attribute


TAG review: https://github.com/w3ctag/design-reviews/issues/204.


Summary

The saveData attribute is a boolean that indicates a client’s explicit opt-in for reduced data usage, due to high transfer costs, slow connection speeds, or other reasons. We already provide this hint via an HTTP header (‘Save-Data’) when Data Saver is enabled. This feature exposes the same signal to JavaScript, to enable runtime / ServiceWorkers to make intelligent decisions with respect to data use.


Link to “Intent to Implement” blink-dev discussion

https://groups.google.com/a/chromium.org/d/msg/blink-dev/IrIwAdMWhAE/B0A23MQhBQAJ


Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes, although there's currently no way to enable Data Saver on WebView.


Debuggability

It would be nice for DevTools to have a toggle to enable/disable Data Saver from the Network Tab. Developers can already toggle this from Settings on Android and from the Data Saver extension on other platforms.


Risks : None


Interoperability and Compatibility

Firefox: No public signals

Edge: No public signals

Safari: No public signals

Web developers: Positive, e.g., see the workbox example that motivate this work: https://github.com/WICG/netinfo/issues/42


Ergonomics

This attribute might be used in tandem with other NetworkInformation attributes to determine the appropriate page fidelity to provide. The point of this attribute is to reduce overall network data use for users who are data sensitive. The attribute implementation does not affect performance.


Activation

This feature is informational and easy to use as-is. Chromium blog or similar outreach should be sufficient to get the word out.


Is this feature fully tested by web-platform-tests? Link to test suite results from wpt.fyi.

Yes: https://wpt.fyi/netinfo/netinfo-basics.html


Entry on the feature dashboard

https://www.chromestatus.com/features/5076813940260864


Chris Harrelson

unread,
Dec 5, 2017, 6:09:33 PM12/5/17
to Ben Greenstein, blink-dev
LGTM1

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADPZbiDYc8BpbhO5a%2Bk-NAk65t5dHhcF-6Wp5_QK%3DO%2BjCaLSpg%40mail.gmail.com.

Yoav Weiss

unread,
Dec 6, 2017, 7:45:14 AM12/6/17
to Chris Harrelson, Ben Greenstein, blink-dev
LGTM2 - this is already exposed through HTTP headers so it makes sense to expose this to JS and enable the stated use-cases.

LGTM1

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw_G-YOPFMAqYMAyp1ojeAFk2kaKrWOfDahQKByJSjHGDg%40mail.gmail.com.

Daniel Bratell

unread,
Dec 6, 2017, 12:24:14 PM12/6/17
to Chris Harrelson, Yoav Weiss, Ben Greenstein, blink-dev
In the TAG review (  https://github.com/w3ctag/design-reviews/issues/204 it seems this will be a topic on a telcon next week. I don't know exactly in what respect, but should we wait to see if there are any late changes?

/Daniel
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACj%3DBEhwJA%2B1vv%2BsTHrm9aEg9Tt2J2ye01CLjZ2nOBDQRcLw0w%40mail.gmail.com.



--
/* Opera Software, Linköping, Sweden: CET (UTC+1) */

Alex Russell

unread,
Dec 7, 2017, 1:45:20 PM12/7/17
to blink-dev, chri...@chromium.org, yo...@yoav.ws, be...@chromium.org
Regarding the TAG review, there's support for exposing to developers a reflective version of this as it's already available by side-effect (e.g., you can set up a server to reflect the header value back to you in the body). Can't speak for the rest of the TAG, but as there's no new info being exposed, it seems harmless from a privacy perspective.

I'm not an OWNER, so can't LGTM, but this has my support.

bratell at Opera

unread,
Dec 7, 2017, 1:52:17 PM12/7/17
to Alex Russell, blink-dev, Chris Harrelson, Yoav Weiss, Ben Greenstein
Ok.

LGTM3

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/aa1c3c5d-2d98-48b3-828d-f977724451c8%40chromium.org.

Reply all
Reply to author
Forward
0 new messages