Hacker News new | ask | show | jobs
by arderary 2021 days ago
I really don't understand the glorification of no-js websites on HN. Like, I'd get it if it was Flash or something ('cause that definitely has some real accessibility issues, and required a plugin to be installed), but the web platform is HTML, CSS and JS. Why artificially limit yourself to just two? It seems to have become a matter of pride to say "works without JS", for absolutely no practical reason (it's not like removing JS is some silver bullet for accessibility, no-js sites can and do still absolutely have problems with accessibility)
2 comments

JS is usually what kills performance on lower end devices. If websites were only html and css, my smartphone from 2015 would still be a functional device. I have yet to have a page crash due to too poorly written html and css.
It depends what you're doing with the JavaScript. This is like saying "C kills performance" because you found one slow C program. JavaScript can actually improve performance in quite a few conditions (even on lower end devices) by preventing full page reloads and such, which adds more overhead in the network, HTML parsing, etc.
If we're talking about saving bandwidth, JS can be useful, although JS bundles are usually heavier than their HTML and CSS counterparts.

I have yet to see an example where rewriting the DOM would end up being lighter on devices with lower-end CPUs and RAM than doing a full page refresh. Browsers already cache static assets, generally a page refresh only takes a second or two (on reasonable connections)

A great example of this: compare Sourcehut to GitHub or any software forge that requires JS.

https://forgeperf.org/

I have nothing against Javascript when it improves the overall result. However, when I come across a site which consists of text articles interspersed with some static images, and the images do not show with JS disabled, or in extreme cases, the entire page remains empty because it needs JS to even display text, that just screams wrong.

Web has been able to display well-formatted text and images for decades without Javascript just fine. In fact, that has been its original primary purpose, to display text with hyperlinks and some images. Why bastardize it just because you want your images to load with a cool effect or something equally silly (that won't work well for half of the visitors anyway) ?