News for hackers. Stuff that matters.
Re:Microsoft fixes 5-year-old Defender bug, reducing Firefox... by tempestn on Monday April 10, 2023 @05:12PM (#35517467)
How much can websites determine about the power of the device they're running on? Obviously it'd be a security issue for them to know too much, but it would be nice to be able to progressively enhance the experience for more powerful devices that can handle it, beyond just mobile vs PC. Even just knowing whether a device was running off battery power could be useful.
Re:Microsoft fixes 5-year-old Defender bug, reducing Firefox... by simlevesque on Monday April 10, 2023 @05:18PM (#35517511)
Here's what's available, requires permissions:

- BatteryManager.charging

- BatteryManager.chargingTime

- BatteryManager.dischargingTime

- BatteryManager.level

https://developer.mozilla.org/en-US/docs/Web/API/BatteryMana...

https://caniuse.com/?search=BatteryManager

Re:Microsoft fixes 5-year-old Defender bug, reducing Firefox... by rileyphone on Monday April 10, 2023 @05:29PM (#35517621)
Isn't available in Firefox though...
Re:Microsoft fixes 5-year-old Defender bug, reducing Firefox... by JohnFen on Monday April 10, 2023 @07:08PM (#35518515)
I don't think you really want websites to make this determination anyway. There are a million reasons why a user might want a website to use fewer resources than their machine could support.

It should just be a setting the user can select. No probing of the machine necessary.

Re:Microsoft fixes 5-year-old Defender bug, reducing Firefox... by tempestn on Monday April 10, 2023 @10:10PM (#35519858)
What should be a setting? This specific youtube ambience thing? That is, but it shows the issue - you need to pick a default, and most people won't know they can change it. Having some idea of the capabilities of the device you're running on could allow you to choose sensible defaults.

But if you mean there should be a setting in the browser that websites could check, I agree that could be better.

Re:Microsoft fixes 5-year-old Defender bug, reducing Firefox... by JohnFen on Tuesday April 11, 2023 @12:42PM (#35527640)
Sensible defaults go a long way, yes! Although in the case of this YouTube thing, I think the sensible default is to have it disabled regardless of the capabilities of the machine.