Skip to content(if available)orjump to list(if available)

JavaScript broke the web (and called it progress)

onion2k

Saying JS broke the web when your website loads 754kB of JS across 13 separate requests makes me wonder if you're very serious about the problem.

serial_dev

> This isn’t about going back to table layouts or banning JavaScript. It’s about building with intent. > It’s not about purity. It’s about outcomes. > Use what works.

I think the website is fast and the majority of that JS is for the comment section+recaptcha (that's also for comments?), website works without it, I can tab through things, and the site is accessible, so I don't think that hundred KB of JS is a big "gotcha!".

However, considering barely any comments, I'd honestly just consider removing them, not because I' mind the couple of hundred KBs, but because nobody uses these anymore. All discussion happens on social platforms and forums.

Springtime

Their site loads fine without JS or cookies/local storage enabled though, which is more than can be said of many sites (and tbh what I was expecting the article to be about given the dramatic headline).

norman784

You are being generous, most sites ships at least few MB of JS garbage.

mschuster91

On a wired connection? No problem. On a crowded mobile network? Or when you got only EDGE (hello Germany)? Whoops.

Hacker News however? Blazing fast - one page and only the CSS is actually required for rendering the page, and it is using both a cache-buster in the URL and a 10 year (!) cache life time. The JS uses the same as well but it's only loaded at the end of the page, so after rendering is done.

gf000

> Hacker News however?

While being completely useless on mobile, with tiny buttons and textarea, which could be fixed while barely making the whole thing larger.

vachina

Hacker news is perfect on mobile. How often do you vote? It is so content dense it’s perfect for mobile.

ale42

That's not a JS problem. It's a UI problem and you mostly solve it with CSS and adapting the HTML, you don't need to add a 3 MB JS framework for that.

reddalo

I agree, it could become way better on mobile with just some small fixes. But in some ways I'm more afraid of a complete redesign.

nurumaik

Hacker News is the only usable mobile website

samat

Life changer for me was discovery of Scaling in iOS Safari.

125% it’s quite nice, actually. Large enough font to read.

Zealotux

I find your argument disingenuous, the website is still usable with JS disabled and it's obvious the article is talking about JS-heavy websites that could do without it, not advocating for a complete anti-JS stance. It also uses HTTP3 is seems, so making 13 separate requests isn't much of an issue, it has a good performance score which is almost surprising for a Wordpress website.

kachapopopow

Well, it's just wordpress and captcha can only be done in js (half the requests).

onion2k

This is the 'no true Scotsman' argument.

"Websites that use JS are terrible and broken."

"Your website uses a ton of JS."

"JS is fine in my case. It's all those other websites that are broken!"

You can implement a captcha without JS. You don't need jQuery or jQuery-migrate in 2025. The site is using Quill for some typography tweaks that could mostly be done in CSS.

FWIW I don't think there's anything wrong with the way the site is built. It looks nice. It loads pretty fast. JS is great - it enables a bunch of capabilities for things that you can't do on a web page without it, and if you're looking for something very specific or hugely interactive it's essential. But I can make that argument because I'm not saying JS is bad. If you say JS is bad and you use it anyway for things you don't really need you're undermining your own point quite a lot.

dudeinjapan

No true Scotsman would ever use Javascript… I guess I need to buy a kilt!

josephg

Why does a blog post need a captcha?

serial_dev

I think it's loaded by the comment section.

null

[deleted]

zaphirplane

Absolutely, do as I say not as I do.

rizky05

[dead]

austin-cheney

Bitch about JavaScript all you want but this exact failure has occurred in many languages. It’s not a language failure. It’s a people failure. Nobody trains JavaScript developers properly and employers knowingly hire unqualified people to do the work. Of course the result is shit. It would be just as shitty if this were a different language.

If you want to isolate yourself from so much of the stupid then use a PiHole on your home network and stop working around JavaScript. It works for me as someone with 15 years writing JavaScript.

hliyan

One theory I have is that JavaScript's originally low entry barrier as an untyped scripting language that works very close to the front end, allowed many programmers who might have found other programming languages too challenging (especially those without a comp sci degree), to be productive. This in itself is a good thing. It democratized programming to some extent. But at the same time, it populated the community with a large number (majority?) of programmers who were not well grounded in computer science or engineering practices. I worked with C++ for ten years before getting into JavaScript, and over the years I have seen some old concepts and solutions being excitedly reinvented in the JavaScript world, often suboptimally.

pyman

We need to be honest about this. JavaScript created loads of jobs, helped people buy houses and raise families. That's real impact, and I respect that. But I can't help wondering: did we choose it because it was the best tool, or just the least terrible one that was easy enough to learn?

Back then, choosing JavaScript felt like choosing simplicity. You didn't need to be a computer scientist to build something with js. But maybe that simplicity was was a long-term trap. It's like we all joined a party because the entrance was free, but no one told us each drink would cost a week's salary. Why bother, we're not the ones paying the bill right?

austin-cheney

JavaScript employment always felt like a spoons versus shovels type story.

https://www.aei.org/carpe-diem/milton-friedman-shovels-vs-sp...

If you cannot do the job without things like React, Angular, or jquery you may not be qualified to write that code. On a bigger level if you cannot create an original application from scratch you aren’t a senior developer and if you don’t measure things you aren’t an engineer.

Nearly every other professional line of work has solved for this with some combination of licensing and/or broker/agent model. Developers tend to be scared shitless of industrial baselines of qualification assessments.

Again, I am saying all this as someone who wrote JavaScript for employment for 15 years and still love writing in the language.

zwnow

Agree, been working with Js (frontend only) for a few years now and never had real issues. I wouldn't chose it for my backends though...

sir_pepe

Why not learn from past failures? Then everybody gets a great user experience, not only those of us who know how to set up a pi-hole. Everybody wins! Apart from the framework-industrial complex, that is.

falcor84

Well, paraphrasing Hegel, we can learn from past failures that the industry as a whole does not learn from past failures. It's just the Eternal September situation, and all we can do is tend our own gardens.

cherryteastain

> We’ve rebuilt the web like an air traffic control system – just to serve a few kilobytes of text.

Funny, in the context of Germany's ATC working off some Emacs Lisp cooked up by one dude in just a week back in the 90s [1]

[1] https://old.reddit.com/r/emacs/comments/lly7po/do_you_use_em...

Sophira

Although I agree that JS is being used incredibly irresponsibly, I also think this article is almost certainly AI-generated with minimal editing based on the way it reads, and I wish that wasn't the case because the topic deserves better than this.

[Edit: Although I recognise that em dashes are what a lot of people use to identify AI-generated text, that isn't what I was doing here. I hadn't even been considering them, to be perfectly honest.]

CreepGin

Holy s@#$! You're right. I didn't catch it at first, probably because it was on the HN frontpage. But yeah, the amount of em dashes (among other things) totally gives it away.

There were so many contradictions in the article, I was going to point them out. Don't see a point now.

eadmund

> the amount of em dashes

… means absolutely nothing. I’ve been heavily using them for decades at this point.

The article itself may or may not be AI-generated, but we cannot penalise folks for simply using a stylish bit of punctuation.

serial_dev

em dashes are not a crime!

Sophira

I would argue that em dashes themselves are not the giveaway that people think they are, and I wish they weren't discriminated against like this.

I was focusing more on what you called "among other things". The way that the article uses English is extremely characteristic of, say, ChatGPT.

kitten_mittens_

Why are em dashes a giveaway? They’re auto inserted on Windows for two hyphens still, aren’t they?

tallytarik

LLMs seem to use them at a rate far higher than the average person, same with the words “delve” and “robust” (and many others)

ale42

Not in every application -- these are two hyphens, Windows didn't touch them.

null

[deleted]

Veen

As someone who makes a living by writing, this myth about em dashes is annoying. I have always used them. But now I have to avoid them so clients don't think my work is AI-generated.

I don't believe this article is largely AI-generated. It reads to me like the work of every marketer who has learned a list of "best practices" and sticks to them rigorously. It's probably also been edited so it aligns with Grammarly's or Hemingway's view of good writing.

Plus, some people seem to think that any polished, professional writing is LLM-ish because that's the style LLMs often imitate (badly).

CreepGin

I feel you. Nowadays I have to use tactical lowercasing and curses here and there to avoid AI-looking responses.

> It reads to me like typical marketing writing.

hmm maybe that's why it rubbed me the wrong way.

ale42

You don't need to be an AI to use em-dashes. I actually use them quite a lot (even outside of Word) and AFAIK I am not an AI. I just care about text layout and proper use of characters. — is Alt-0151 on Windows (ok you need a keyboard with numeric pad).

CreepGin

Well, you may need to worry about them now. It's a well-known issue with the mainstream LLMs. Every few days, you see a new post on reddit from people asking how to get rid of em dashes from ChatGPT, etc.

Even when they are not a telltale-sign, folks are afraid of using them now because of AI. I'm not saying em dashes are bad. Our books are littered with them, and that's why LLMs spit them out consistently.

https://medium.com/@brentcsutoras/the-em-dash-dilemma-how-a-...

serial_dev

It's ok that it's (allegedly) AI generated, I didn't read past the headline anyway, just asked AI to summarize the article in 2 sentences, then I came back to argue on HN.

Lapz

I often see people say “JS is unstable,you’re always rewriting your code for the latest and greatest framework” and I always wonder where do you work? If I told the people I report to I can’t deliver that for you because we’re rewriting the app, I’d be out of the door soon.

The JS ecosystem is like any technology ecosystem, things change over time but you don’t have to chase the trends, be pragmatic about what you follow and trust me your life will be golden.

phendrenad2

There was a time between 2015 and 2020 when framework fatigue was a real thing. People were jumping between angular, ember, react, vue, and if you were unlucky enough to choose react, Crazy Mad Scientist Dan Abramov was telling you YoureDoingItWrong(TM) every other tuesday and prompting everyone to rewrite their app in shame (even though they wrote it the way that was trendy LAST tuesday).

Since then, things have settled down a LOT.

RedShift1

Yeah true especially if you were trying to use Typescript. Every npm update broke things.

vasachi

Usual arguments for "upgrading" are:

* We can't hire specialists for older frameworks.

* We can't generate positive hipe over older technologies.

* New technologies are better, so we will deliver features faster.

In reality, it's almost always resume-driven development.

al_borland

> In reality, it's almost always resume-driven development

This is what drives me crazy. I’ve been at my company for a couple decades. I want stability and long term health of the company.

The resume driven development isn’t even from the engineers, it’s from the leadership. An IT leader gets hired from the outside, starts a big project that will look good on the resume, then midway through the project, they are just far enough to try and call it a success and leverage it into a new position. Now we have a leadership change in the middle of a giant foundational shift of the infrastructure. The new leader comes in and does the same thing. I don’t see how a company can survive this long term. It creates such fragility. People like me, with little interest in job hopping, aren’t looking to resume build. I’m looking to have the company’s operations run smoothly so customers have a reliable service, so we retain them as customers… and for a little peace and stability myself. These resume building leaders make that difficult and seem to actively work against the long term health of the company. They aren’t interested in the next 10-20 years, they are only worried about their next job in 3-4 years, with no concern for the mess they leave behind.

I hope this is just a trend and it dies soon. The needless stress it has brought into my once simple life has been rather unpleasant.

brulard

It may be resume-driven, but that's the state of the world. If you fail to keep your team members and attract new ones as the team needs to grow, you are fighting a losing battle.

al_borland

Maybe all these needless technology shifts are the reason the team members are leaving.

al_borland

The people I report to are the ones telling me to rewrite the same thing every other year on a new platform and stack. It drives me mad. Challenging these ideas risks my job.

For things they don’t care about, I am using very basic tools that have worked for the last 10+ years and will likely work fine for the next 20 years. This allows me to solve new problems instead of continuing to solve the same problem over again. At least that’s my goal. In reality, it allows the tools I need (but management doesn’t care about) to “just work”, freeing me up to rearrange the deck chairs on the Titanic for them. All of this is for internal tools. We’re just raising operating costs on things that have 0 impact on revenue. I don’t really understand the vision.

eitland

In 2017, I met modern frontend. In a few hectic months, I had to learn AngularJS, Gulp, Grunt, and some CSS improvement system (LESS or Sass or something). Then I moved on to Angular and worked with it for a couple of years. For the first time, it actually started to feel worth it. But what a churn in the beginning. Angular 2, 4, 5, 6, and I think up to 9 all dropped while I was still working with it.

Since then, I’ve mostly worked with React, which is blissfully productive and unexciting in the best way possible as long as we prevent people from pulling in CV-padding material like Redux.

Over the past few years, I’ve been hired into places where I’m once again upgrading codebases written in AngularJS (yep, it still exists), Elm, and jQuery. Everything gets rewritten to React, and after that we can hire people right out of school to maintain it (as long as we keep the CV-padding libraries out of it).

I guess this is a long-winded way of saying: even if you’ve been lucky enough to work in a place where people made good technical decisions years ago, and work in a place that treat their devs well enough that someone who still remembers how it works cares to work there —not everyone’s that lucky.

dgb23

To contrast: JS _the language_ is one of the most stable languages out there.

glutamate

> Spoiler alert: we didn’t get app-like performance. We didn’t get better user experiences.

Not sure about that, I'll take Gmail and fastmail any day over outlook and evolution

jxjnskkzxxhx

Is your problem with outlook specifically or with email apps in general? Wanna tell us more about it?

glutamate

the main reasons for my preference are that: gmail/fastmail are simple, I can use from multiple computers easily, have good defaults and most importantly, they almost always work. Outlook users seem to constantly have something broken.

I do realise that i am reaping the benefits of a centralised system, and in the case of gmail, monetised by advertising, surveillance and user lock-in. Probably the ideal for me would would be a self-hosted web client, e.g. Mailcow

hakanderyal

> The result? Broken back buttons. Image bloat. Inaccessible markup. URLs that don’t behave like URLs. Metadata that disappears. Content you can’t copy. Buttons you can’t keyboard to. Modals that trap you. Scroll positions that reset for no reason. Headlines that shift mid-read. Analytics that don’t match reality. Preview environments that lie. And pages that load… eventually. --

None of that is the fault of Javascript, it's on the people building them. I'm pretty sure in an alternate universe of no JS, we would see the same articles but about the horrible user experiences of full HTML or native apps.

onion2k

None of that is the fault of Javascript, it's on the people building them.

This is logically correct, but I don't think it's true in the spirit of the argument. Browsers makes it very easy to deploy a broken website. They're incredibly tolerant of faults. Consequently there's no accountability for problems.

If browsers didn't try to display broken apps in a sort-of-working-but-not-really way there'd be a lot fewer broken apps.

anonzzzies

Javascript seems to attract the most horrible frameworks that stimulate this more than in other languages, but agreed, not the fault of the language. It's a horrible language as well, but that's another story.

al_borland

This is largely because all of these frameworks are a collection of hacks to get Jacascript to do things it was never designed to do.

It seems if we want to have single page application that act like desktop apps, maybe we need a new language/technology that browsers can handle that is designed for this.

Maybe WASM is supposed to be the answer there, but it doesn’t feel like it (I haven’t really looked into it much). These JS frameworks have had way too much time to get out of hand without something coming in to fundamentally change things to make them obsolete. I worry this whole generation was raised on complexity, with nearly unlimited compute, and they lack the limitations which led to some of the more elegant solutions of the past. Though I could just be wearing rose colored glasses.

While a lot of pages would be well served by going back to a more traditional style, there are web apps that require more, and in lieu of a better alternative, people are going to keep hacking more frameworks around JS to make it happen.

seanparsons

I think the fact that it's a horrible language is a big contributor to the frameworks being horrible as well. There's all these incidental sacrifices that have to be made which bleed through into everything else, like handling null and undefined.

dgb23

> Inaccessible markup

Way too many very basic UI affordances cannot be made accessible without JS if they can be implemented at all.

helloguillecl

The problem is that getting those things right is 4x more difficult in a SPA app than a legacy, server rendered, app.

- No native back and forward button implementation. Now you must listen to an API and emulate the legacy behaviour.

- The concept of links, its also emulated via onClick events. This means that anything can be a link, so in many cases rows become links and their content is not really selectable as text. Legacy HTML has clear limitations for this not to happen.

- Same with buttons. There are no native buttons anymore. Anything can be a button, including any DIV with an event listener. Good luck tabbing through every DIV to get you to a button, that's also another difficult implementation.

sensanaty

Again, none of this is down to SPA frameworks (other than back/forward history APIs, lot of people break this unfortunately, though I've never understood how they manage to as I've never had this problem on projects I worked on). What often happens also is that people embed a bunch of iframes, and history within iframes can act very weirdly.

Links in Vue Router at least are just regular <a> tags. Yes the framework handles navigation when clicking these, but nothing prevents anyone from wrapping anything they want in an <a> tag even with no JS. You could make an entire table be clickable as a link if you wanted to, framework or not. "Legacy" HTML will render these just fine and browsers will make it a regular link, even though HTML validators will fail it.

Literally the first element anyone makes in frameworks will be a generic Button element that is simply a <button> with some styling. People abuse divs as buttons with or without frameworks because again, nothing prevents you from making any arbitrary element in your DOM have an onclick handler and act as a button. Tabbing through can even work with the correct ARIA attributes, and can even be broken on regular plain <button>s if abused hard enough.

I would seriously suggest people try out Vue or especially Svelte, they're about as simple as you can possibly get (especially Svelte 4) while giving you a lot of power and flexibility. I've worked with plenty of server-rendered apps in the past, and trust me, people would butcher things just as badly and easily there.

chrisandchris

I wholehartly disagree - all of the mentioned problems are problems created by the developer. All these things work with the common SPA frameworks - developer just tend to forget what an anchor or a button is and use a span or div for it.

Having the proper tool and using the tool properly are two different things - and the web is a place where people forgot to do things the proper way.

gherkinnn

The problem is that it is at least 4x easier get everything wrong using an SPA.

All the SPA frameworks handle browser history and links correctly.

Taek

Javascript is a platform that gave developers the ability to modify the core UX of web browsers. That's a platform problem, not a builders problem - if you don't want crappy apps on the web that break things, then don't give developers the power to break things.

vladms

I find this a strange way of thinking on a site called "hacker" news...

In my opinion there is NO problem. We have powerful tools that give you freedom and the possibility of tinkering. Some people will use it in ways one doesn't like, but as long as you have some possibility to use other products I think it is great.

I wouldn't trust anybody (including myself) to decide for all others what are the powers that should be given or not. The web architecture is amazing exactly because it allows everybody to build without some large body/organization/company imposing most rules.

LunaSea

This is nonsense, any language makes it possible to crash a program but somehow it's only an issue for JavaScript

Xenoamorphous

> At the same time, JavaScript stopped being just a front-end language. With the rise of Node.js, JS moved server-side – and with it came a wave of app developers entering the web ecosystem. These weren’t web designers or content publishers. They were engineers, trained to build applications, not documents. And they brought with them an architecture-first mindset: patterns, state management, dependency injection, abstracted logic. The result? A slow cultural shift from building pages to engineering systems — even when all the user needed was to load an article.

Based on my experience, I think this is wrong. Node.js didn't open the web app gates to non-web devs (those devs more likely than not wouldn't even know JS), it was the other way round: it opened the backend gates to frontend devs, because suddenly they could use the language they know to run code in the server.

neya

In 2010, Facebook was one of the best websites to browse. It was everything you wanted a central social media platform to be. You could stay updated about your friends, family and even host pages for your business on it. Everything was just so simple - because they respected what a "hyperlink" actually meant.

Fast forward today, I click on a dropdown on a post with barely 3-4 options, there's a spinner, a dozen requests in the network panel and the menu doesn't even load and gives up. Frontend libraries like React made frontend so needlessly complex that they actually ended up killing the definition of what a hyperlink is.

You click on a link today, it can either take you to where it's supposed to take you, open a dozen random popups or wipe your bank account clean. I miss the good old 2000s era where JS was minimal and the focus was on HYPER TEXT in HTML. We had good content, less frontend complexity. And we had flash for everything else.

reddalo

Until last year, you could still experience that thanks to the "mbasic" version of Facebook. It was truly blissful, like the good old times. But it was increasingly buggy and they killed it for good last year.

vladms

While I don't agree with other points, things got clearer once I reached the following:

> Marketers, content editors, SEOs, designers – they’re all locked out of the process. Because now, even simple tasks require technical fluency.

I worked in web development in the 2000s and then restarted in 2020s. The power of the tools, the speed of development and the result are all much better. The downside? You need to know more (because you can do more and some required things are more complex and people expect more) and less people might be required (ok, this is a downside for some people only...).

Why are we talking about some megabytes transferred nowadays? Most of us have in our pockets a computer 100 times stronger than the first one that beat a human at chess (not to mention that one was occupying rooms). It is more important to have the flexibility and to be able to scale complexity when you need to (hard and not given even with the frameworks), than to "save" some megabytes.

wffurr

The fast pocket computer might be fairly common in fully developed countries, but bandwidth is not. It’s trivial to run into use cases with limited network bandwidth regardless of how fast your iPhone is.

And if you broaden your idea of your user base a bit, even the fast computers aren’t ubiquitous. Try using a low end Android phone sometime, or a hand me down iOS device still on iOS 12.

em-bee

bandwidth is not the problem. latency is.

a site where every interaction requires an http request and a reload of the page performs much worse over low latence than an SPA that is designed with a local first approach where all interaction is local and data requests happen in the background.

not all SPAs are designed like that. but none of the traditional sites are designed like that either because they can't.

take hackernews as an example. in order to write a reply i have to click a link, wait for the page to load, click submit, wait for the submission to complete and for the updated page to load.

i live with bad internet. submissions and pageloads on hackernews frequently time out.

with an SPA the first click would open a text field without any server request at all, and submit would happen in the background while i can keep reading. and it can be repeated if it fails without me noticing and having to worry about it.

likewise updating for new messages could happen in the background without me having to wait for a page load. on top of that new messages could show up in a different color without having to track that in the server.

null

[deleted]

immibis

A low-end Android phone that is 100 times as fast as a Cray 1, yet still can't load a blog post.

farseer

That is because the actual alternatives to JS such as Flash, Silverlight and Java Applets were much worse. Native apps are bound by the platform's walled garden and practically undiscoverable, hence the need for web apps.

immibis

Native apps. Plain HTML (sometimes with server-side apps). When Javascript was becoming a problem, native apps weren't yet the lock-in ecosystem they were today; arguably that ecosystem is only possible because everything became a web app first.

dudeinjapan

Come on now. Flash, security holes aside, was way better! It even had ActionScript which was essentially JavaScript.

gbromios

I wish that it did actually break the web so I didn't have to see this same dumbass article every two weeks

agos

seriously. add to it the endless streams of comment in the same vein every time something related to frontend development is announced

ale

Brought to you by chatGPT this time!

fabianmg

As soon as I read "award-winning SEO consultant" I stopped reading, another marketing guy...