But it would have been good security wise and privacy wise if this divide were made more explicit.
But it would have been good security wise and privacy wise if this divide were made more explicit.
Javascript was intended to script HTML pages long before the concept of a "web app" was a thing. A divide between static documents and "apps" never even existed in theory, and with very few bleeding-edge exceptions, apps are also documents.
All of the privacy violations and dark patterns that javascript gets employed for are the result of choices made by developers and corporations... they're not fundamental and innate features of javascript or of having scripting in the web to begin with, so they're not problems that would be solved by quarantining the language to some kind of "app" space.
It's not like all of the problems on the web are caused by technology. Adding a <script> tag to your HTML doesn't automatically make your page weigh 10MB and snoop on its users. All those problems are caused by business decisions. When you decide to add an analytics script, or put an ad on the page, or hire a designer to make it look appealing to customers - that's where things go wrong.
In other words: even if we had a page/app split on the web from the beginning, businesses would still fuck it all up, and we'd have the same problems with bloat, ads, dark patterns and surveillance capitalism as we have today.
The reason the distinction isn't present in web standards is that likely no one foresaw the massive complexity of modern js applications using HTML as a GUI analogue - it was assumed that code on the web would be like shell scripts or utility scripts, and javascript was just intended for light housekeeping, nothing that would necessitate forking the entire web to create an "app" space.
However I have yet to find much evidence of hostility towards the concept of running code on the web from the people who actually came up with it - the "javascript delenda est[2]" attitude seems to be a modern ideology. Rather, the discussions I've read were about how to make it possible, what languages to use, etc. Not how to prevent it.
[0]https://lists.w3.org/Archives/Public/www-talk/OverviewOld.ht...
[1]https://eager.io/blog/a-brief-history-of-weird-scripting-lan...
Mozilla can implement it like they they did with asm.js, after all it is a subset, not a superset.
It will then work in all browsers but (I guess) can be made to work much faster if the browser knows it can ignore the piles of old hacks that full html has to consider.
Edit: and like asm.js it might lead to something even better going forward.
Looking at even a good old-fashioned blog, there are really three nested things on your screen: the blog post document, the blog post-viewing application, and the browser.
Why a blog post-viewing application? In theory you could skip it and just have a plain reader view, but in practice you do want to have navigation and comments, and that's what the application part is for.
Many modern systems surface that split in the form of an API: the API is what gives you access to the underlying document.
The challenge would be making that solid accessible to the user. For example, could a browser natively have two address bars? One for the document, and one for the application that is used to access the document?
Then it's there when you need it, but the friction discourages it from being used frivolously and gives you the opportunity to decline when the context makes it obvious it's not being used for anything good.
I don't think this expression makes any sense. https://en.wikipedia.org/wiki/Exception_that_proves_the_rule...