That toggley button is so good. The front-end meme developers in this thread are absolutely seething over this post but it's a good point. Why do we have all these stupid sites made in JS? If people just followed one standard like HTML, everything could be consistent and you could easily adapt it for things like accessibility or translation. You go on modern sites and the back button doesn't even work because it dynamically loads things all on a single page.
>If people just followed one standard like HTML, everything could be consistent
That would also require browser creators to be consistent in implementation
& you still have the "relying on people to update things" problem where it could be years after a new feature is introduced until it's widely enough supported to be useful
I do tend to agree there are plenty of poor implementations and convoluted JavaScript contraptions. Afaik there's plenty of standardized solutions to keep back button functionality with dynamic content and afaik the popular web frameworks support that out of the box.
Well usually the framework requires a plug-in and the plug-in requires RTFM which not all developers do. Also these frameworks and their plug-ins change and have their own dependency management that can cause code rot in short order that leads to accessibility or functionality falling off quickly. The solution to this becomes smoke testing for these already solved problems. Standardizing on built-in behavior makes testing all of this functionality the responsibility of someone not on your payroll or Jira board. I get that this isn't always going to be the solution, but that doesn't mean our code still needs to follow patterns developed to support Internet Explorer.
> The front-end meme developers in this thread are absolutely seething over this post but it's a good point.
Are they actually seething? I've read the top comments on this post and don't see much that I'd describe as seething, just some people who bring up valid points about browser support.
I don't see any web developers seething - web development is complex and everything has trade-offs. I for one am eagerly awaiting a universe with excellent native HTML controls. However this golden future is still a long ways over the horizon for variety of reasons.
This thread feels more like "never-JS" users patting themselves on the back for their choice to always disable JavaScript in 2023. Look, I get it, but we have to build software with real world constraints, and some of those constraints are plain and simple business hubris. Plenty of times I've seen a product owner demand a feature that can only be had with JS, and no amount of arguments to semantic HTML purity will change their mind as to why we can't have that same feature that Gmail has. If I don't build it for them, they'll hire someone who can.
Also two separate times in the last year I've had to help a team that's using traditional MVC with no JS at all, and now they have a feature that can only be done with JS. But they have an entire dev team and no one knows JS at all. They don't even know where to start, so they're calling me in to help them retrofit it in at great expense. It would have been cheaper to just use JS from the start, and they have to pay for that mistake.
Sadly this is lost on a lot of folks here. We're not using JS out of ignorance, we're using it out of necessity. We don't build react front ends for CRUD because it's inherently better to browse with curl, we do it because it's currently the most effective way to meet the needs of the business. The goals of the business rarely align with the goals of opinionated technologists, but that hardly is grounds for the level of scorn I see from that crowd.