4 ms·
why is this even available to websites? navigator.getBattery().then(function(a) {console.log(a);}) https://developer.mozilla.org/en/docs/Web/API/Battery_S
by y0ghur7_xxx 10y ago
why is this even available to websites?
navigator.getBattery().then(function(a) {console.log(a);})
https://developer.mozilla.org/en/docs/Web/API/Battery_Status_API https://developer.mozilla.org/en/docs/Web/API/Battery_Status...
- axlee 10y agoTo be able to load a less resource intensive version (i.e. disable animations, reduce refresh rate, remove canvas elements etc...) of a website if the battery is low.
- Globz 10y agoYea ok...but who does that really ? lets face it, this is just some extra signals so they can track you more easily. I know it was never intended to be used as tracking information but the least they could do is be less precise about your battery percentage.
- rtpg 10y agoThis is less of an issue if websites prompted you. I think the iOS permission model (which is what the web is going towards) is a pretty good model. This lets sites who want to do "real things" with battery levels have access, without it being available "for free" (prompt is annoying).
- TeMPOraL 10y agoThis is ridiculous IMO. Instead of providing false (or "less precise") data let's not provide that data in the first place. My guess is this is just another part of the attempt to move desktop features to the web browsers so that people don't have to write actual applications. Personally, I don't like this trend.
- braythwayt 10y agoAs I noted elsewhere, it’s about more than “so that people don’t have to write actual applications” (although I grant you that you have identified a real thing). For the ideologically inclined, it’s also about disintermediating the relationship between users and developers. Web sites don’t need an app store.
- Aardwolf 10y agoThen it would certainly be useful to be able to spoof this battery level reported by your browser: then you can always get the less resource intensive versions and surf longer :D
- leni536 10y agoBe careful with that, you might see higher prices then. > “Some companies may be analysing the possibility of monetising the access to battery levels,” he writes. “When battery is running low, people might be prone to some – otherwise different – decisions. In such circumstances, users will agree to pay more for a service.”
- dasboth 10y agoThat just feels so sketchy. What a waste of time and knowledge just to chase more profits.
- jacquesm 10y ago> What a waste of time and knowledge just to chase more profits. That describes a scarily large portion of all web stuff.
- dasboth 10y agoTrue, but for some reason this one hit a nerve. At least in most cases digital marketing can (at least slightly) benefit the user, but in this case the benefit is 100% with the company. Uber were alleged to charge more for those with low batteries too. Ugh.
- mindslight 10y agoMarketing used to be beneficial to consumers by helping them become aware of new products and their features. In an era of instant information search and retrieval, this is no longer necessary. It's all zero-sum spam intended to overwhelm one's decision making capabilities coupled with surveillance to enable better price discrimination.
- xorcist 10y agoIf the battery already is too low, it's kind of late to switch to a less resource intensive web page. That should have been done from the beginning.
- OMGWTF 10y agoPractically nobody cares about not draining your battery. All they care about is your attention and/or your wallet.
- braythwayt 10y agoWebsites? No. Web applications served over HTTP, on the other hand... Mozilla have it as part of their mission to make technology open and accessible (insert DRM debate here). Native apps have been thrown behind the app store “walled garden.” So, they want to make it possible to create rich apps over HTTP. Thus, you find things like this available to web pages.