News for hackers. Stuff that matters.
Re:In protest of the web{*} bulldozer, a response to websock... by _bxg1 on Wednesday May 20, 2020 @05:15PM (#23251883)
The web already has a user-facing permissions system; it wouldn't be hard to add many of these under that umbrella (USB, Bluetooth, and Sensors stand out as obvious candidates that should've been behind that barrier from the beginning). Battery Status definitely seems pointless overall.

But I don't agree with the overall thesis, that the web fundamentally should not get features like these. Though, obviously, some of these "standards" have been rushed through and poorly executed.

I think for this we can blame Chromium's dominance. As the author said, many of these features were probably motivated by Chrome OS. And the devil's bargain of letting Chromium take such complete control over the web is that Google can strongarm whichever new "standards" they like into the Web.

The standards committee doesn't want WebBatteryStatus? Fine, we'll implement it anyway and now Chrome desktop/mobile, Chromebooks, and Edge will all have it. Sites that want to use it will probably just use it and throw up a "Use Chrome" notification for Firefox and Safari.

Re:In protest of the web{*} bulldozer, a response to websock... by strombofulous on Wednesday May 20, 2020 @05:31PM (#23252026)
I own a business and recently had to change all the pictures on my website from webp to png because safari both refuses to render webp and pretends to accept them. I hate it so much and see very real costs in increased bandwith (every image is around 3-4x bigger) but I have no choice because I want people with iphones to be able to buy things from me. Safari is honestly just as bad as chrome but for different reasons (ios safari was arguably the single biggest cause of the death of flash, for example). I also had to go through and fix a few other pseudo css classes that only safari didn't support which was really annoying, what a waste of time.

I don't think many people would consider "Don't use safari" banners a valid option unless the website was somehow really focused on non-apple users or not trying to sell something.

Re:In protest of the web{*} bulldozer, a response to websock... by uryga on Wednesday May 20, 2020 @06:00PM (#23252434)
> safari both refuses to render webp and pretends to accept them

weird, i haven't had that issue! i run a site that's set up¹ to redirect image requests to a WebP version if the Accept header allows it; half our team uses Macs w/ Safari and no one reported any issues with images.

---

¹ wordpress + webp-express: https://github.com/rosell-dk/webp-express i guess it's possible they special-case Safari, i'll check later

Re:In protest of the web{*} bulldozer, a response to websock... by chipperyman573 on Wednesday May 20, 2020 @06:05PM (#23252502)
It could've been my setup, to be honest I had just finished fixing all the pseudo classes and was kind of frustrated and decided to just switch to png after I couldn't figure it out in 5 minutes hahaha

But whatever the case is, Safari definately does not support webp and special exceptions need to be made to support this edge case.

Re:In protest of the web{*} bulldozer, a response to websock... by cookiengineer on Thursday May 21, 2020 @12:23AM (#23254777)
> https://caniuse.com/#search=webp

Nope you are right, when reading the linked issues, safari doesn’t have webp support.

Re:In protest of the web{*} bulldozer, a response to websock... by ComputerGuru on Thursday May 21, 2020 @03:08AM (#23255625)
Yeah, but that’s not the issue/question. Not supporting webp is fine, the important thing is that it doesn’t send an accept header that includes it. I don’t believe it does.
Re:In protest of the web{*} bulldozer, a response to websock... by uryga on Thursday May 21, 2020 @10:26AM (#23258722)
just had a friend with a Mac test it. when requesting foo.jpg (from an <img> tag), it sends:

  Accept: image/png, image/svg+xml, image/*;q=0, video/*;q=0.8, */*;q=0.5
the server responds with foo.jpg.

i also tested it in Firefox, which sends:

  Accept: image/webp, */*
the server responds with foo-converted.webp.

honestly, i'm not entirely sure how

  image/*;q=0
  */*
etc are handled, but it works; i also briefly looked at the plugin's source, and i haven't found any special handling for Safari. btw, here's a test page linked in their docs: http://toste.dk/rh.php

---

edit: looking at the generated .htaccess, it appears that WebP is served only if Accept contains an explicit `image/webp` (no wildcards), so that explains it.

Re:In protest of the web{*} bulldozer, a response to websock... by stx on Thursday May 21, 2020 @02:16AM (#23255376)
> ios safari was arguably the single biggest cause of the death of flash

I count that as a good thing about ios safari.

Re:In protest of the web{*} bulldozer, a response to websock... by _bxg1 on Wednesday May 20, 2020 @05:35PM (#23252079)
I use Roll20, a popular web app for playing tabletop games with others over the internet. It doesn't work in Firefox or Safari; it's the only reason I keep Chromium on my machine.
Re:In protest of the web{*} bulldozer, a response to websock... by franga2000 on Thursday May 21, 2020 @08:51AM (#23257761)
I've used Roll20 a fair amount in Firefox and the only times I've had to pull out Chromium it turned out the the bug was present there too. Which things specifically don't work for you? (gf knows one of the devs, so I might try to poke at them to fix it)
Re:In protest of the web{*} bulldozer, a response to websock... by Kalium on Wednesday May 20, 2020 @05:37PM (#23252106)
Really? That's very odd. I use in just fine with Firefox weekly.
Re:In protest of the web{*} bulldozer, a response to websock... by _bxg1 on Wednesday May 20, 2020 @05:44PM (#23252219)
It might only be the video/audio chat that's broken, but I know something about it was broken
Re:In protest of the web{*} bulldozer, a response to websock... by fenwick67 on Wednesday May 20, 2020 @06:51PM (#23252933)
About 6 months ago I remember it being totally unusable on FF, even without using the AV stuff.
Re:In protest of the web{*} bulldozer, a response to websock... by chipperyman573 on Wednesday May 20, 2020 @05:37PM (#23252108)
For every example you can find me of a website that doesn't support safari I could find 10 that make exceptions to do so. The point isn't that nobody does it, it's just that most companies who want to make money from the general population (aka most of them) have to.

Roll20 is also such a niche thing already it's not really a fair example. People who want to use roll20 will use another browser because they want to play dnd with their friends. Most stores don't have that social aspect.

Re:In protest of the web{*} bulldozer, a response to websock... by _bxg1 on Wednesday May 20, 2020 @05:47PM (#23252278)
My point is that if YouTube stopped working on Firefox because they didn't agree to a new standard Google had invented, lots of people would stop using Firefox.

It takes someone who really cares about these issues to bother switching back and forth between two different browsers because you want to use a non-Chromium for most things but have to use Chromium for a couple of things. The vast majority would just say "well, whatever" and switch completely.

Re:In protest of the web{*} bulldozer, a response to websock... by mohitk05 on Thursday May 21, 2020 @03:42AM (#23255806)
Re:In protest of the web{*} bulldozer, a response to websock... by spc476 on Wednesday May 20, 2020 @09:25PM (#23253969)
I stopped using Roll20 but switched to Zoom chat. Zoom chat has much better video chat support, also has a private chat function, and for our game, we could do without the "whiteboard" and the computerized dice rolling. It also would kill my network connection. It was a horrible experience.
Re:In protest of the web{*} bulldozer, a response to websock... by aidenn0 on Wednesday May 20, 2020 @11:31PM (#23254554)
I've been using Roll20 on Firefox for 4ish years. (I was a Kickstarter backer, but I'm not sure when I switched to Firefox from chromium).
Re:In protest of the web{*} bulldozer, a response to websock... by fenwick67 on Wednesday May 20, 2020 @06:49PM (#23252909)
> I think for this we can blame Chromium's dominance. As the author said, many of these features were probably motivated by Chrome OS. And the devil's bargain of letting Chromium take such complete control over the web is that Google can strongarm whichever new "standards" they like into the Web.

The dark side to this is that the Chrome team can implement an API as an experiment, then when it's ready, propose it to the standards body and push it through before anybody else can catch up.

Re:In protest of the web{*} bulldozer, a response to websock... by andrewguenther on Thursday May 21, 2020 @01:18AM (#23255053)
I don't really see it as a dark side, but an important part of standardization. Why standardize an API no one wants? What's the best way to know someone wants it? What's the best way to work out the kinks in a proposal? A reference implementation.

I get what you're saying though. Google has the manpower to crank these out at a volume none of its competitors can, but I don't think that's a failure of the standards process.

Re:In protest of the web{*} bulldozer, a response to websock... by pferde on Thursday May 21, 2020 @03:57AM (#23255880)
I don't think it's about the manpower, but more about controlling a browser engine that powers an ever-increasing number of mainstream browsers.

Chrome's lumbering march to total dominance has been frightening to watch for many years now, and it only seems to be accelerating.

Re:In protest of the web{*} bulldozer, a response to websock... by londons_explore on Thursday May 21, 2020 @04:16AM (#23255989)
The fact they accept PRs from outside changes your argument a little.

If you have a good idea for a new web standard, you can download the chromium source, add your new standard, build your cool webservice to work with it, and send the chromium OWNERS (many of whom don't work for Google) a PR.

Sure, there will be a bunch of rounds of review and questioning if your feature really is suitable for the whole web, but at the end of the day you'll probably get it in. Then you can add it to Firefox. You could theoretically add it to safari too, but they don't really like taking PR's these days...

Re:In protest of the web{*} bulldozer, a response to websock... by _bxg1 on Wednesday May 20, 2020 @06:57PM (#23252987)
Yeah, that too
Re:In protest of the web{*} bulldozer, a response to websock... by alerighi on Wednesday May 20, 2020 @05:58PM (#23252419)
I don't think these features are bad, they are useful in some ways. Why we need USB on the browser? Think about updating the firmware of a device, you just go to the webpage, connect the device to the USB and update it, without having to download and install a tool to flash it, for an operation that you need to do just one time. This is only one example of many that we can make, another could be IDEs in the browser to program boards like Arduino, without installing software on the PC.

Battery status? It could be useful to know if the PC is connected to a power source and the level of the battery, even for a stupid scenario like watching a video, when I'm low on battery I usually reduce the resolution of a YouTube video because reproducing a 4k60p video uses a lot of resources, and drains the battery quickly. It would be useful if the webapp could just do that automatically, maybe on YouTube an option like reduce resolution when low on battery. Or for games, or whatever uses a lot of resources.

Think about it: the only reason because Electron apps exist (and we waste 200Mb of disk for each one of them) is only because browsers don't have APIs to access the filesystem! To me is a waste, the browser should give each application (let's stop calling them sites, they are no longer that) the APIs and permissions to access hardware, just like on mobile devices you have a dialog that says "this app would like to access the internal storage, consent or deny?".

Where is the problem? The user should give the privilege (only one time) and you finally can do basically 99% of work in the browser (and maybe the browser introduces also API to run the application in a window), you no longer need Electron just to do these kind of things, is still more secure than Electron because the code is sandboxed by the browser, and you don't have to worry about packaging your software for different operating systems.

Re:In protest of the web{*} bulldozer, a response to websock... by derefr on Wednesday May 20, 2020 @09:00PM (#23253810)
> Battery status? It could be useful to know if the PC is connected to a power source and the level of the battery, even for a stupid scenario like watching a video, when I'm low on battery I usually reduce the resolution of a YouTube video because reproducing a 4k60p video uses a lot of resources, and drains the battery quickly. It would be useful if the webapp could just do that automatically, maybe on YouTube an option like reduce resolution when low on battery. Or for games, or whatever uses a lot of resources.

I don't think it's a wrong API, but it certainly is a backward one. I don't want a website to collect low-level information from my computer's ACPI sensors, and then build its own policy on top. (Will I, the user, get any control over that policy? Probably not.) Instead, I want my OS to implement an energy policy (and a control panel for that policy) and then to maybe expose the information about the current energy policy to websites.

E.g., I'd be fine with iOS telling websites that I currently have Low Power mode enabled. If I don't have it enabled, then I don't care if the website thinks 10% is an emergency—I left it disabled for a reason. (And, contrariwise, if I turned on Low Power mode at 100% battery, then I'd like the website to cooperate.)

For a similar idea, I don't want websites to try figuring out that my IP translates to a cellular data connection. But I do want the state of my OS's "Metered Data mode" setting to be passed on to websites, so that they can help me to use less data, when I've decided I want to do so.

Re:In protest of the web{*} bulldozer, a response to websock... by saagarjha on Wednesday May 20, 2020 @06:54PM (#23252956)
> I don't think these features are bad, they are useful in some ways.

That’s the whole point: they look like APIs that might be useful for something but then they invariably become used for fingerprinting or an attack surface and we find out that nobody was actually using it at all, even though we came up with a couple of legitimate-sounding use cases for it.

> the code is sandboxed by the browser

What’s the point of a sandbox if you keep poking holes in it by adding new APIs?

Re:In protest of the web{*} bulldozer, a response to websock... by dmix on Wednesday May 20, 2020 @09:45PM (#23254063)
aka the road to hell is paved with good intentions
Re:In protest of the web{*} bulldozer, a response to websock... by gruez on Wednesday May 20, 2020 @08:32PM (#23253636)
>Battery status? It could be useful to know if the PC is connected to a power source and the level of the battery [...]

But when was it ever implemented in the wild? This applies to most of these "features". There's a bunch of theoretical use cases, but there's pretty much 0 use for it in reality, and even if there's significant use, it's used more for fingerprinting.

Re:In protest of the web{*} bulldozer, a response to websock... by MayeulC on Thursday May 21, 2020 @04:27AM (#23256070)
IIRC, that feature might have been introduced by Mozilla for FirefoxOS? A lot of sensor APIs were.

The idea isn't bad, but it should probably be guarded behind some permissions...

Re:In protest of the web{*} bulldozer, a response to websock... by jschwartzi on Thursday May 21, 2020 @01:07PM (#23261194)
> Why we need USB on the browser? Think about updating the firmware of a device, you just go to the webpage, connect the device to the USB and update it, without having to download and install a tool to flash it, for an operation that you need to do just one time. This is only one example of many that we can make, another could be IDEs in the browser to program boards like Arduino, without installing software on the PC.

This is a great idea! Now I not only have to be careful what drivers I install, I also have to be careful which websites I visit or they'll drive-by brick my development tools. Thanks!

It really should not be easy to update firmware on a device. It should be hard enough that it establishes obvious user intent. And I don't want to use a browser to do this. They're unstable enough without adding in soft real-time requirements. Firefox crashes on me about once per day. Doing it while I'm updating a $3000 JTAG adapter would be an absolute disaster.

Re:In protest of the web{*} bulldozer, a response to websock... by vbezhenar on Wednesday May 20, 2020 @06:05PM (#23252500)
Another use-case for USB is to access crypto tokens. There are USB devices which store private key and allow to perform crypto operations. It's much safer than storing private key in file system. Using those keys in website is a useful feature.
Re:In protest of the web{*} bulldozer, a response to websock... by goalieca on Wednesday May 20, 2020 @09:00PM (#23253805)
Ditto for smart cards. I've seen a lot of activex apps over the years do this.
Re:In protest of the web{*} bulldozer, a response to websock... by mindslight on Wednesday May 20, 2020 @06:57PM (#23252983)
> The standards committee doesn't want WebBatteryStatus? Fine, we'll implement it anyway and now Chrome desktop/mobile, Chromebooks, and Edge will all have it. Sites that want to use it will probably just use it and throw up a "Use Chrome" notification for Firefox and Safari.

The right answer is for Mozilla to implement the API, and leave it disabled by default. Disabled meaning it reports 90% full all the time, or some suitable probability distribution. If a specific API is actually useful for something, then the browser can notice if it being used and pop up its own permissions dialog to enable the API per-site.

Re:In protest of the web{*} bulldozer, a response to websock... by usefulcat on Wednesday May 20, 2020 @08:38PM (#23253683)
That is starting to sound a lot like some sort of arms race.
Re:In protest of the web{*} bulldozer, a response to websock... by no_wizard on Wednesday May 20, 2020 @09:06PM (#23253849)
Truth is, from the browser vendor perspective, it already is. Firefox used to be in an "arms race" of sorts when it was one of the most dominate browsers as well. Google just intensifies this reality as Microsoft with internet explorer rested on their laurels at a certain point which let Mozilla not have to push as fast/hard as they do now.
Re:In protest of the web{*} bulldozer, a response to websock... by mindslight on Thursday May 21, 2020 @01:21PM (#23261477)
Yes, as is any ecosystem with competing parties. Surveillance companies want to exfiltrate as much information as possible, users want security. Every new facet added to the API is a site for this competition. Which is why every new web API needs to be reviewed by someone looking out for security of the users.
Re:In protest of the web{*} bulldozer, a response to websock... by _448 on Wednesday May 20, 2020 @11:46PM (#23254607)
Reminds me of the EEE and Microsoft post recently on HN.
Re:In protest of the web{*} bulldozer, a response to websock... by josteink on Wednesday May 20, 2020 @05:33PM (#23252054)
> The web already has a user-facing permissions system; it wouldn't be hard to add many of these under that umbrella (USB, Bluetooth, and Sensors stand out as obvious candidates that should've been behind that barrier from the beginning)

Let’s add Javascript to that list too.

Not all sites need it, and given the abuse it’s responsible for, it shouldn’t be permitted unless a user opts in.

Re:In protest of the web{*} bulldozer, a response to websock... by neotek on Wednesday May 20, 2020 @08:47PM (#23253730)
>Not all sites need it, and given the abuse it’s responsible for, it shouldn’t be permitted unless a user opts in.

And 99.999% of internet users will therefore be trained to blindly click "accept" on any permission popups a website shows them, since outside of HN pretty much everybody loves and appreciates the rich functionality javascript provides.

Re:In protest of the web{*} bulldozer, a response to websock... by catalogia on Wednesday May 20, 2020 @10:24PM (#23254254)
> And 99.999% of internet users will therefore be trained to blindly click "accept" on any permission popups a website shows them

Or not, when they inevitably discover that leaving it turned off bypasses 90% of newspaper website paywalls whereas turning it on slows their browser down to a crawl and floods their screen with ads.

Re:In protest of the web{*} bulldozer, a response to websock... by hombre_fatal on Wednesday May 20, 2020 @05:58PM (#23252417)
That was also the logic behind Windows Vista's UAC popup.
Re:In protest of the web{*} bulldozer, a response to websock... by josteink on Thursday May 21, 2020 @03:20PM (#23263623)
A great example!

That single move from Microsoft more or less eliminated the need for any normal application run by any normal user to require admin-rights to function, something which up to that point more or less had been the norm.

Developers fixed their applications to work with a sane privilege level and pretty much everyone was better off.

Let’s do the same with the rampant JS-abuse on the web.

Re:In protest of the web{*} bulldozer, a response to websock... by vbezhenar on Wednesday May 20, 2020 @06:06PM (#23252518)
Chrome allows to disable JavaScript by default and only allowing it on some websites. Probably privacy and security-conscious users use that feature.
Re:In protest of the web{*} bulldozer, a response to websock... by Shared404 on Wednesday May 20, 2020 @09:41PM (#23254038)
Pretty sure most privacy conscious users don't use Chrome.