Anonymous 05/19/2020 (Tue) 18:08:26 No.14169 del
Because the model of a static webpage for everything has proven unfit for purposes of modern™ Web®.
I think the smarter move would be to redesign the protocol and the markup language itself, allowing for more in-page interactions with a server in a standardized manner and defining more semantics in general instead of just a document markup, but things like those are hard to plan in advance and redesigning shit would mean losing/splitting the userbase.

Honestly I just feel bad mostly because Web was used for things it wasn't designed for thus thwarting the establishment of some competitive standards. For example, web online banking/payments shouldn't really be a thing, web browser games shouldn't be a thing (though actual native games didn't really suffer because of this afaik), web-based instant messaging like webchats shouldn't be a thing and so on. Instead, there should be applications covering use cases out of the scope of Web. That's what I feel bad for. JS is just a symptom of this and a solution to extend that scope to the infinity, because now we can have pages do pretty much whatever webmasters want, and the world has pretty much moved into the Web world, not the application world as far as user experience goes (JSON applications still talk pretty much Web).

>how to fix this
I actually don't know. Allowing web pages to do whatever they want is more powerful than designing some very powerful but static scheme first to later find out users (webmasters) want to do something entirely different. One thing people could do is stop using Web entirely but I don't see it happening anytime soon. The worst thing that happened to Web users' recklessness so far is the snowden- and whole privacy awareness thing, I think, but it is not nearly enough to stop that "whatever works, goes" train. Also to be completely honest, JS isn't necessarily a terrible user experience nor a privacy/security risk (no more than using web by itself). Probably even the most sophisticated logic could be coded in some tens of kilobytes of JS but instead we have obfuscated monsters taking actual megabytes of space that actually could fail to load and guess what - robust™ JS have logic for that also which bloats them even more lol. Yeah. Programming is hard, I guess.