> Because the problem is, JavaScript can fail to load in several ways. Here's a non-exhaustive list of cases...
The author answered their own question. In even the best effort case, noscript is the fallback.
I'm not even sure what they expect the website maintainer to do for most of that list. If they knew themselves, they would have put it in the blog post. Is this instead a call to draft new w3c specs or revisions? What am I misunderstanding? For a site that has "hacktivism" in the domain name, whining like this is a bad look.
I think you're missing the part where they quote the recommendation from the HTML spec:
> For this reason, it's generally better to avoid using noscript, and to instead design the script to change the page from being a scriptless page to a scripted page on the fly
That seems perfectly reasonable for modern sites and browsers to be able to do. `noscript` is effectively a relic from older days where you just didn't have the same budgets, tools, and browsers as today, where you couldn't seamlessly enhance the site how you can now. We shouldn't continue to use it in the same way we shouldn't continue to use `marquee` or `blink`.
I feel like <noscript> does a fine job at what its meant to do. The article's complaint is that it isn't magic and can't solve all problems, but nothing can.
No, noscript doesn't do a fine job, because it will be handled incorrectly on browsers that fit any situation like the ones on the article's list of examples.
A tiny minority of people that disable javascript does that in a way that is handled correctly.
But writing a page that works by itself and modifying it by scripts will work almost everywhere as long as you add any external dependency in a way that invalidates your script on errors.
No, I didn't miss that part. It's irrelevant to my point.
The noscript tag is just a way to conditionally display some HTML. There's no reason to avoid using it unless you are deeply entrenched in a pseudoreligious fight against javascript.
It really is just whining.
> didn't have the same budgets, tools, and browsers as today, where you couldn't seamlessly enhance the site how you can now
noscript came before modern CSS, it came before XMLHttpRequest, it was around before a lot of things. It was before we had modern standards and practices around progressive enhancement. A lot of things that are commonplace and easy to do now would require hours and hours of hand-writing javascript, instead of using modern libraries and selectors to easily target and replace content.
I don't know if you were coding back in those days, but I definitely remember how much more work it was to do progressive enhancement back then if you wanted a really JS-enhanced site. We were all basically individually inventing it, because it hadn't be standardized and popularized yet.
I honestly don't understand the framing of best practices here as "whining." I also don't understand your refusal to read the article, because you say "no reason" but the article explicitly states the reason:
> The noscript element is a blunt instrument. Sometimes, scripts might be enabled, but for some reason the page's script might fail.
I dunno, I like having my page continue to reasonably work when unforeseen errors happen. (And they do happen. We've been at this business for decades, but errors have happened, can happen, and will continue to happen.) I generally prefer my users to have a good experience when possible. And if I can design my page intelligently, to progressively enhance, instead of displaying a blunt "WHAT ARE YOU, A JAVASCRIPT-HATER LOL" error message, well, I'd prefer that. =)
The author answered their own question. In even the best effort case, noscript is the fallback.
I'm not even sure what they expect the website maintainer to do for most of that list. If they knew themselves, they would have put it in the blog post. Is this instead a call to draft new w3c specs or revisions? What am I misunderstanding? For a site that has "hacktivism" in the domain name, whining like this is a bad look.