News for hackers. Stuff that matters.
Re:The optional chaining operator, “modern” browsers, and my... by vlunkr on Tuesday January 11, 2022 @01:56PM (#29895975)
> Websites should still be functional (even if a bit inconvenient) without Javascript.

I don't see why it needs to go that far. They could have just not used the optional chaining operator, or used a pre-processor if they really wanted to use it.

Very few people are browsing with no JS at all, and they are doing it deliberately. They probably disagree with me, but I don't think anyone should do extra work for them.

Re:The optional chaining operator, “modern” browsers, and my... by berdario on Tuesday January 11, 2022 @03:38PM (#29897498)
It's not about choosing to be

> browsing with no JS at all,

It's about building a reliable product. I've witnessed tons of cases of websites broken due to Javascript. Sometimes they were broken in Firefox, other times they were broken only in some locales...

Often they were not broken forever, a bad release got pushed, and it took some times for the problems to be identified and addressed... but in the meanwhile, a specific part of their website was broken 100% of the time.

If you're building the new Google Maps, sure... knock yourself out with the fanciest Javascript you can find (but even then, I'd set a restrictive CSP, to avoid other script from interfering, and I'd pick something like Elm to make sure that runtime errors are minimized). But if you're building anything else, you should really try to keep it simple (even Gmail still has its plain HTML version)

Re:The optional chaining operator, “modern” browsers, and my... by zdunn on Tuesday January 11, 2022 @04:53PM (#29898592)
It's not extra work. The site in question was for making a reservation. A basic HTML for would have satisfied that requirement and worked completely without javascript. Any additional features could have been built with javascript and the site would be no different to users on modern browsers as the current build, but it would still work on the author's mom's browser.

Progressive enhancement isn't about building sites completely without JS. It's about building resilient sites that work on edge cases like this.

Re:The optional chaining operator, “modern” browsers, and my... by jw14 on Tuesday January 11, 2022 @10:04PM (#29901771)
It is absolutely extra work. You have to test every mode of operation. So to support those with JS disabled (about 1.3% of users according to some quick searches) you have to test with JS disabled. Then you have to test again to make sure your JS workflow is stable.

Every business has to make the choice, but unless I was running a pretty large operation, I'd be willing to ignore 1.3% to put my budget into other things.

Re:The optional chaining operator, “modern” browsers, and my... by pier25 on Tuesday January 11, 2022 @03:34PM (#29897438)
Exactly.

The cost to make a website accessible to everyone is so high that it really only makes sense for critical websites.

Re:The optional chaining operator, “modern” browsers, and my... by bmeski on Tuesday January 11, 2022 @03:48PM (#29897623)
It’s really not if you simply stick to html, css, and a tiny bit of js on the client.
Re:The optional chaining operator, “modern” browsers, and my... by pier25 on Tuesday January 11, 2022 @08:06PM (#29900966)
Unfortunately that approach doesn't work for many (most?) use cases.
Re:The optional chaining operator, “modern” browsers, and my... by bmeski on Tuesday January 11, 2022 @08:23PM (#29901119)
What?

They are literally the 3 client “languages” of the web.

Everything your abstractions/frameworks do is produce html, css, and js.

Re:The optional chaining operator, “modern” browsers, and my... by pier25 on Tuesday January 11, 2022 @10:17PM (#29901855)
What does that even mean?