Skip to main content Accessibility Feedback

How to build lean efficient websites in 2023

The web feels more bloated than ever.

Everywhere I look, people are giving conference talks on how to jam even more JavaScript-driven UI components into what are mostly static websites and weird “though leaders” who don’t actually understand CSS are talking about why you need their CSS library to “fix” all of the “bugs” in CSS that are actually features.

(I’m looking at you “the Cascade is the worst part of CSS” guy!)

The problem has gotten so bad, a new set of tools like SvelteKit and Astro attempt to smooth over a lot of these bloat by moving it to a compiler that spits out leaner end-user code.

That’s a great step, but it doesn’t fix the underlying problem: the tools that we use to build for the web often fight against the grain of it, and add a tremendous amount of overhead, cognitive load, and literal cost in terms of money and electricity used to power it all.

So, how do you actually build a lean, efficient site in 2023?

  1. Start with mostly static HTML. If you’re building a blog or a marketing site or something like that, your journey can often stop here. Grab a tool like 11ty or Hugo and you’re good to go!
  2. Progressively enhance the dynamic parts. Have some API-driven content? Static-site generators can fetch that for you, too. But if it’s user-dependent or has to run in the browser, use JavaScript for just the parts that require it.
  3. Pick small, focused tools. Is your dynamic content rendered once and then done? Just use vanilla JavaScript. Does it get updated with user interactions? Grab a smaller state-based UI library like Preact or Solid instead of one of the big monolithic tools.

Of course, each situation is a little bit different.

You might need a database, or a specific hosting environment. You might have specific technical requirements or be locked into certain vendors.

But generally speaking, you can still build lean, fast websites in 2023. It mostly requires fighting against the tide of constantly chasing the new hotness and the latest buzzwords.