Battery Status API being Removed from Firefox due to Privacy Concerns
bleepingcomputer.com
bleepingcomputer.com
Alternative (only for power) could be the levels of concern in power usage: low concern (desktop or mobile that is charging), concern (mobile), high concern (mobile on low battery). Then we could streamline it more, because websites know when you are on mobile already and give single flag: low power. But approach from first paragraph is probably more sensible.
You can limit everything for everyone and maybe give option to enable softer limits for certain sites. I just hope that it would not hurt legitimate sites.
So if your phone was dying you were more likely to accept it because you wanted to book the ride before it died?
Unscrupulous websites could theoretically manipulate your experience in similar ways using battery level knowledge, I would think..
A `onBatteryLow` callback might do the trick?
I thought for sure the average would be to just completely ignore them.
That's not a good reason to keep a feature ever.
Given the context, browsers are ultimately a user's tool, not the developer's and the validity of APIs should be gauged by how useful they can be to the end user. If you can't demonstrate a valid use-case for the end user then there's no business having the API.
> That's not a good reason to keep a feature ever.
I'm not sure I understand you there. If there are good reasons for it existing (as I presume there are) then surely that is a good reason for it to be kept?
> If you can't demonstrate a valid use-case
Perhaps a full-screen kiosk application needs to indicate battery level (because any OS indicator is hidden? Though admittedly this is not going to be a common need.
Another use would perhaps be to turn off "excess" animations in a game when the battery is low.
My point is that you need to scrutinize things a little more and not just trust that there's a good reason for something, especially if it looks problematic.
A minimal boolean API (onPower/onBattery) would be sufficient for most application uses.
It could even be limited to an integer, or even keywords: 'good', 'medium', 'low', 'critical'.
And the problem probably won't go away by just killing one feature. As far as I know such user fingerprinting techniques work because values from lots of APIs get taken into account, so just killing one API won't solve the problem completly.
What bothers me most, is that this is a step back for webapps developers, the web app loose a feature the native apps can still use, it's just sad.
I guess the mozilla team has put some thought into this!? I would really like to know what their pros and cons where. I wonder what other solutions they considered and why those where all dismissed until finally deciding in favor of such a drastic move.
For example the mere presence of battery API gives bits of information (because it identifies your program as phone or computer). I assume that Battery API:
A) Provides enough bits of information,
B) Isn't useful enough.
If that was the primary use-case, why not add a new feature that explicitly handles this?
You could imagine an "emergency shutdown imminent" callback that the browser invokes if there is a high likelihood of an emergency shutdown (because of battery level or other indicators). This would also give the browsers more leeway in evolving this feature and experimenting with different indicators, without breaking compatibility.
Probably already on the way.
I'm not sure why we're keeping the clickbait title; the feature is the battery status API, which a study (http://lukaszolejnik.com/battery) showed might open up privacy issues. EDIT: Neither complaint applies to the new title. Thanks to the editors for changing it!
(Actually it would probably be "In web browsers, a feature finds an unexpected use" or some such)
EDIT: It's been fixed now, thanks.