JavaScript is one of the three core file types of the web. You can rely on it as much as HTML and CSS. I don't get the unique derision of JS compared to the other files types.
JavaScript is one of the three core file types of the web. You can rely on it as much as HTML and CSS. I don't get the unique derision of JS compared to the other files types.
That's an understandable take in nearly all commercial and institutional contexts. But in others just involving human people, no. Many times JS does fail or isn't available. So building progressively enhanced web documents preserves utility across the spectrum of human visitors (and maintains accessibility). But if you only have a profit motive, then yes, there's no need for robust solutions. The amount of people that can't do JS well won't eat into profits or cause enough complaints to get you in trouble.
I think progressive enhancement is a cool approach to building stuff.
I also think “turn JS on” is a fairly reasonable ask these days. A lot of the web tends to break when CSS is disabled or fails, too.
If your HTML or CSS fails to load, you're going to have a hard time too. Web pages have many critical resources.
Failing to load is not a problem. Failing to execute is.
Usually because the web dev have used some new Javascript feature only $latest JS engines support. HTML and CSS if they're there they're there. Sure, there's caniuse for HTML and CSS. But they only have to load. The text/images/etc will be there. JS both has to be loaded and executed. If the later doesn't happen just right then the text and other multi-media won't be there. It's a very big difference.
Generally i agree.
I think there are a group of people who are salty that js became “the lang” for the web. Another group of people loath the framework insanity of webdev. I count myself among the ladder not the former. I equally hate all languages.
Js is heavily overused but the “web” of today is not the web of the 90s or 2010s which some people cannot get over.
No, you can't really rely on it. Welcome to Performance Inequality Gap: https://infrequently.org/2024/01/performance-inequality-gap-...
One additional thing that article fails to mention: you should not test your device in a context where it can cool itself easily. Test on your devices when they are wrapped in a blanket, and while there's another program using 100% CPU.
Your conclusion is not the same as the article you link. Js is fine but it should be used relative to the targeted use case.
That astonishingly long and researched read loses impact when it draws a primarily moral based argument in the thesis. Being fast is better for both the privileged and underprivileged.
Moral handwringing rarely moves people to action.
> Your conclusion is not the same as the article you link.
My conclusion directly derives from the article. If your app relies on Javascript, it will be non-functional/broken/unusable for a huge number of people while their devices struggle to download, unzip, parse and run your JS bundles.
BTW. It's worse with web components built with default assumptions (without bundling). Since `import` statements will cause a long waterfall as each component loads its dependencies.