News for hackers. Stuff that matters.
Re:WebUSB is dead by JohnFen on Monday February 03, 2020 @04:22PM (#22229277)
I really wish this is the direction the web would go. This "browser as OS" stuff isn't something that I'm even a little OK with, and I'd love to have a browser that simply didn't have the support for any of it.
Re:WebUSB is dead by pdkl95 on Monday February 03, 2020 @05:57PM (#22230302)
Viewing a document on the web needs to be decidable. The original design of the web was HTML documents with forms. This IBM 3270 style design used the browser as the user interface to server-side programs. The browser's job of presenting a document was decidable and the form submission, page load process allowed the user to understand and control the data sent to a server. The server learns what was in the form and URL when the user decided to click the submit button.

Moving the software into the browser improved latency, but questions like "Is this webpage doing something dangerous/annoying?" became undecidable. If we provably cannot determine if a webpage will halt without running it, we obviously cannot as any more complicated questions about the webpage's behavior. As long as webpages have access to a Turing complete language, the browser will be de facto an OS. Unfortunately, returning to a web of documents isn't going to happen anytime soon; too many people profit from this ability to run programs on other people's computers.

(Gary Bernhardt's amazing (and terrifying) talk "The Birth & Death of JavaScript"[1] was absurdist comedy, not a guide to future browser designs)

[1] https://www.destroyallsoftware.com/talks/the-birth-and-death...

Re:WebUSB is dead by JohnFen on Monday February 03, 2020 @06:13PM (#22230426)
> Unfortunately, returning to a web of documents isn't going to happen anytime soon; too many people profit from this ability to run programs on other people's computers.

Yes, I've resigned myself to this truth long ago. Since then, I've been watching the web get smaller and smaller as more and more websites break unless they're allowed to run code client side.

I fully expect that the majority of the web will become inaccessible to me within my lifetime. Alas, the future does not always bring wonderful things!

Re:WebUSB is dead by bawolff on Monday February 03, 2020 @08:09PM (#22231278)
Decideability is absolutely not the problem. Subjectivity is a problem - There is no objective definition of an obnoxious ad.

I mean, behaviour of a website may be undecideable. Behaviour over the 5 minutes you're viewing it is. I dont think notions from computability theory are particularly enlightening here.

Re:WebUSB is dead by nitrogen on Tuesday February 04, 2020 @12:11AM (#22232614)
There is no way to know for sure that the minified JS on a website isn't sending every keystroke you enter into a password field before you click submit, until you run the JS.
Re:WebUSB is dead by colejohnson66 on Tuesday February 04, 2020 @11:57AM (#22237891)
Why wouldn’t “deminifying” work? Then you just read the code.
Re:WebUSB is dead by omnimus on Tuesday February 04, 2020 @02:50AM (#22233321)
Funnily enough Gary Betnhardt seems to only write and talk about javascript nowdays.
Re:WebUSB is dead by VoxPelli on Monday February 03, 2020 @04:29PM (#22229356)
Deactivate javascript: Done
Re:WebUSB is dead by JohnFen on Monday February 03, 2020 @04:34PM (#22229418)
Yes, I do that already, but that doesn't remove the code in the browser. Also, I'd really love a JS interpreter that was restrictive enough that I could leave it on without exposing me to this stuff.
Re:WebUSB is dead by VoxPelli on Monday February 03, 2020 @04:43PM (#22229515)
Not just an interpreter – unless there's a standardized subset that one can look for as a web developer then one can't really adopt to it (through either graceful degradation or progressive enhancement). Same reason why eg. Noscript addons creates havoc at times. Web sites expects a certain baseline and when it's not there, they expect that javascript will be disabled altogether and <noscript>-tags to get executed, but just disabling some code prohibits that fallback, making it less usable than fully disabling js.
Re:WebUSB is dead by JohnFen on Monday February 03, 2020 @04:49PM (#22229564)
Good point. I guess there's no real hope, then. I'll take the runner-up position in that case -- I want a browser that has no support for Javascript and the like at all. In the meantime, I'll just continue to leave it disabled.
Re:WebUSB is dead by VoxPelli on Monday February 03, 2020 @05:00PM (#22229696)
Closest I can think of is efforts like https://jerryscript.net/ and https://duktape.org/ – but the challenge isn't in the language itself really, but in the web API:s that gets added to it.

Eg. Node.js doesn't have WebUSB either :)

Re:WebUSB is dead by progval on Monday February 03, 2020 @04:34PM (#22229408)
And then you can't see the article, because its CSS hides the text and Javascript un-hides it; and people call you an extremist.
Re:WebUSB is dead by gpderetta on Monday February 03, 2020 @08:20PM (#22231357)
I wish there was a reader mode only browser. You would need to somehow extract navigational links though.
Re:WebUSB is dead by VoxPelli on Monday February 03, 2020 @04:44PM (#22229523)
That's not a good way to handle it, harmful to the web :/
Re:WebUSB is dead by chris37879 on Tuesday February 04, 2020 @01:31AM (#22232985)
And then large swathes of the web stop working. Usually you're better off, but you're screwed if a site you need uses javascript to render its content.
Re:WebUSB is dead by weare138 on Monday February 03, 2020 @04:46PM (#22229536)
Only problem with that is it breaks so many sites now. Most major sites I've tested without JS recently are borked.
Re:WebUSB is dead by michannne on Monday February 03, 2020 @05:00PM (#22229710)
And that is how it should be. All parties need to align on how the future of the Web will look. If most users want a site with fancy features, that's what developers will make, and that is what businesses will prioritize
Re:WebUSB is dead by JohnFen on Monday February 03, 2020 @06:18PM (#22230464)
> And that is how it should be.

Well, I don't think that's how it should be, but that's certainly how it's turning out.

How it should be is that websites degrade gracefully, and remain usable (if more limited in terms of geewhizzery) without client-side scripting.

Re:WebUSB is dead by imtringued on Tuesday February 04, 2020 @06:41AM (#22234476)
And how do you expect that to happen? HTML hasn't been designed for that at all. Nowadays even extremely minor features require usage of JavaScript. For example a simple auto complete field that loads things from the database as you type. There is no way "graceful" way to implement this without JavaScript. There are some ugly ways that offer an extremely poor user experience (drop downs with 100000 elements) but those require additional developer resources on top of whatever basic feature you're building. You will also have to add a huge amount of forms and intermediate pages because of the limitations of HTML that will only be used by 1% of your user base and they will hate the experience no matter how much effort you put into it.

No, the ship has sailed. Just activate JavaScript and block ads/trackers.

Re:WebUSB is dead by JohnFen on Tuesday February 04, 2020 @12:42PM (#22238505)
> HTML hasn't been designed for that at all.

It absolutely has. That's a fundamental design goal for HTML.

> For example a simple auto complete field that loads things from the database as you type. There is no way "graceful" way to implement this without JavaScript.

True, so if the user doesn't have JS enabled, you don't do that. Omitting that functionality doesn't remove the ability to make use of the website.

You're arguing that making proper websites is too expensive to justify. That's your call, of course, but that's a different argument than "it can't be done".

> Just activate JavaScript and block ads/trackers.

No, that's too risky. What I'll do instead is not use the website.