4 ms·
It's a shame the API's aren't better for this situation, pinging a static asset to determine network status is not good for battery life on smartphones if it's
by Brakenshire 9y ago
It's a shame the API's aren't better for this situation, pinging a static asset to determine network status is not good for battery life on smartphones if it's going to occur for any length of time.
- devdad 9y agoDo you have any information to support this claim about battery drain? Genuinely interested, not trying to negate what you're saying.
- Brakenshire 9y agoI don't have any citations, it's just my understanding that switching on the mobile radio is a major battery drain, and should be avoided as much as possible.
- ivan_gammel 9y agoIt also badly impacts UX, because on slow networks the request-response roundtrip even for small static asset may be very long, so that the time needed for the feedback in the form will be in fact doubled.
- devrandomguy 9y agoThe real problem is that there is no way to reliably know just how far your connection goes, without pinging. You might be able to connect to URLs on a university WAN, but not to the rest of the internet, for example. In this situation, as far as uni websites are concerned, you are online, but for Youtube, you are effectively offline. The concept of "online" does not have a trivial boolean definition.