top | item 36723824

Too Much JavaScript? Why the Front End Needs to Build Better

2 points| hernantz | 2 years ago |thenewstack.io

5 comments

order

mydriasis|2 years ago

> Often, it boils down to one common problem: Too much client-side JavaScript. This is not a cost-free error. One retailer realized they were losing $700,000 a year per kilobyte of JavaScript, Russell said.

Boy that's a lot.

You know recently I tried writing "just browser native javascript" for my little baby website. It's all through Github pages, so they give you a nice little server that you can use based on your git repository. It's shockingly nice, and also shockingly easy to get stuff done with just vanilla JS.

I wonder how much I could get done if I weren't terrible at CSS, haha. That's really the only thing holding me back from making my site appealing to look at. The JS is honestly very easy, it's a simple language to use and the browser is an awesome environment with a billion and one tools ready for you to use.

But CSS, man. Every time I try to style something it winds up looking like a 2002 haunted house nightmare.

shortrounddev2|2 years ago

if WASM could manipulate the dom we could write our pages entirely in compiled languages which optimize their builds. As it is right now, WASM seems to be useful only to people who do clientside computation

rolandtannous|2 years ago

what happened to static website generators? They're clean, fast and leave almost 0 carbon footprint (theoretically)

senttoschool|2 years ago

They're still here. But SSG websites can still have plenty of Javascript. It's just that the HTML for every page was pre-rendered.

But SSGs aren't practical for web apps. They work great for content-only sites.