Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define that rtt is zero "in absence of recent RTT measurement data" #63

Open
foolip opened this issue Jun 14, 2017 · 2 comments
Open

Define that rtt is zero "in absence of recent RTT measurement data" #63

foolip opened this issue Jun 14, 2017 · 2 comments

Comments

@foolip
Copy link
Member

foolip commented Jun 14, 2017

https://wicg.github.io/netinfo/#dom-networkinformation-rtt

This is what the implementation in Chromium does, but starting from the spec I can't find that this should be the case.

Should it be the case? Maybe the value matching the effectiveType should be used? https://wicg.github.io/netinfo/#effective-connection-types

@igrigorik
Copy link
Member

Copying related questions from blink-dev thread...

In the code it looks like downlink, rtt and effectiveType all fall back to other values when "not observing," e.g. rtt will be 0. In practice, would this happen every time the phone has been turned off for 5 minutes, or in some much rarer circumstance?

It seems reasonable to have this fallback, so that users of the API can just use the values and have things work well enough. Absent any randomization, it will mean that it's possible to tell when the device hasn't been recently active at all, is that worth spelling out in https://wicg.github.io/netinfo/#privacy-considerations?

@tarunban @bengreenstein would love to hear your thoughts and experience on this one..

@tarunban
Copy link
Collaborator

Yes, the renderer returns 0 as the RTT estimate when a value is not available from the network state notifier in Blink. However, this is an artifact of implementation, and in practice, by the time the JS API is called, a non-zero estimate would be available. https://bugs.chromium.org/p/chromium/issues/detail?id=728771 has more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants