News for hackers. Stuff that matters.
Re:The optional chaining operator, “modern” browsers, and my... by theandrewbailey on Tuesday January 11, 2022 @01:25PM (#29895497)
The dev made a mistake by having a Javascript error totally break the site. Websites should still be functional (even if a bit inconvenient) without Javascript.
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?
Re:The optional chaining operator, “modern” browsers, and my... by autokad on Tuesday January 11, 2022 @01:30PM (#29895575)
No. Stop defending bad practice. its conceivable there are new functions that are not backwards compatible. At some point you need to be able to update your browser. its the fact she is locked out from doing that is what puts her in the pickle. Google and Apple made sure she can't get a new browser so that she would purchase a new device. period.
Re:The optional chaining operator, “modern” browsers, and my... by neon_electro on Tuesday January 11, 2022 @01:38PM (#29895691)
Arguing that websites should support the least common denominator of functionality and then progressively enhance for modern functionality is not simultaneously defending corporations' planned obsolescence. Both problems can be solved independently.
Re:The optional chaining operator, “modern” browsers, and my... by null_object on Tuesday January 11, 2022 @01:45PM (#29895810)
> Apple made sure she can't get a new browser so that she would purchase a new device. period.

Just bullshit. There are plenty of browsers being updated and fully compatible with iOS 12.

Re:The optional chaining operator, “modern” browsers, and my... by LinAGKar on Tuesday January 11, 2022 @01:50PM (#29895898)
Not, there isn't, because no one else is allowed to make a browser for iOS. Any other "browser" on there is just a reskin of the built-in Safari.
Re:The optional chaining operator, “modern” browsers, and my... by autokad on Tuesday January 11, 2022 @02:04PM (#29896114)
did you even read the article?