|
|
|
|
|
by bobthepanda
2209 days ago
|
|
The problem with establishing something like a better compressed format is that 1. it needs buy in from all the browsers or it might as well be useless 2. browsers need to bend over backwards to be backwards compatible so that you can run old web pages. if a browser does not work on all the web pages a consumer needs they will simply not use it. 3. I would bet good money that most of the management in charge of the websites that make up the web would not waste dev time on migrating to some minified JS file replacement, when webpack-style minifying works "just fine" and allows your team or whatever to keep churning out new features |
|
I don't think so personally. Code size is a huge issue for page performance, and a "bytecode" format would probably be 2-3X smaller and 2-3X faster to parse. Together, this might triple JS loading speed. Maybe double the loading speed of JS heavy sites.
JS with sourcemaps isn't so different from compiled code with debug symbols. The sourcemap support could probably be adapted with minimal work. And its likely the transition would be transparent to most users, nobody really looks at the minified JS as it is.
Another big advantage is vastly simplifying JS parsing and JIT compilation. In Java and C#, most features are added without changing the code format. And when it does get updated changes tend to be minimal. Upgrading browsers and minifiers every time JS adds a language feature is a real burden on the ecosystem