Technique matters more than tooling. Two teams using identical frameworks can produce sites that differ by a factor of five in load time and by an enormous margin in maintainability. The difference is in the patterns they apply.

These are the techniques that have the largest practical effect on a project, roughly in order of impact.

Choose a rendering strategy per route

The most consequential technical decision in a modern web project is where HTML gets generated. There are three options, and the mistake almost everyone makes is picking one for the whole application.

Static generation (SSG) builds HTML at deploy time. The server does nothing at request time but hand over a file. This is the fastest possible delivery and the most reliable, because there is no runtime to fail. Correct for marketing pages, blog posts, documentation, product pages — anything identical for every visitor.

Server-side rendering (SSR) generates HTML per request. Necessary when content differs per user or changes constantly. Slower than static and requires a running server, but still delivers complete HTML to the browser.

Client-side rendering (CSR) sends a near-empty page and builds it in the browser. Appropriate behind a login where SEO is irrelevant and the data is personal anyway.

The right architecture mixes them. A typical business site might be static for marketing and blog routes, server-rendered for a search results page, and client-rendered inside the customer dashboard. Modern meta-frameworks let you decide this per route, and using that capability is one of the clearest markers of a well-built application.

Treat performance as a budget, not a phase

Performance work added at the end of a project is remedial and expensive. Performance treated as a constraint from the start is nearly free.

Set a budget before building: a maximum JavaScript payload, a maximum largest-contentful-paint time, a maximum number of third-party scripts. Then enforce it in CI so a regression fails the build rather than reaching production.

In our experience the overwhelming majority of real-world performance problems come from two sources:

  1. Images — uncompressed, served at desktop dimensions to phones, and not lazy-loaded
  2. Third-party scripts — analytics, chat widgets, tag managers, ad pixels, each loading more scripts

Fixing those two usually produces a bigger improvement than any amount of framework optimisation. Specifically: serve modern formats such as WebP or AVIF, set explicit width and height to prevent layout shift, lazy-load anything below the fold, and audit every third-party script for whether it justifies its cost.

Write semantic HTML

Using <button> for buttons, <nav> for navigation, <main> for the main content and heading levels in order is not pedantry. It is the single cheapest technique in this article and it delivers three things at once:

  • Accessibility — screen readers rely on these elements to convey structure
  • SEO — crawlers use the same signals to understand page hierarchy
  • AEO — AI systems extracting answers rely on heading structure to find them

A <div> with a click handler does none of this. It is not keyboard accessible, it is not announced correctly, and it carries no semantic meaning. The correct element is almost always less work.

Progressive enhancement

Build the core experience so it works with HTML alone, then layer JavaScript on top for improvement. A form that submits normally and is enhanced into an asynchronous submission works in both worlds. A form that only exists in JavaScript fails completely when a script fails to load.

This is unfashionable advice and it remains correct. JavaScript fails more often than teams assume: patchy mobile connections, corporate script blocking, an error in a third-party library taking down the bundle. The sites that degrade gracefully are the ones that still take the enquiry.

Component-driven architecture

Build interfaces from small, self-contained, reusable components rather than page-shaped templates. The practical benefits compound: a change to the button style happens once, two developers can work without colliding, and components can be tested in isolation.

The common failure is over-abstraction — creating a configurable component with eleven props when two separate components would be clearer. A useful rule is to duplicate until the third occurrence, then extract.

Design the API around what the UI needs

Frontend performance is frequently limited by API shape rather than frontend code. If rendering one screen requires six sequential requests, no amount of optimisation on the client will fix it.

Design endpoints around screens, not around database tables. Return the data a view needs in one response. Paginate anything unbounded. Where a client genuinely needs flexible querying, GraphQL or a tRPC-style typed layer is worth the complexity — otherwise REST designed thoughtfully is simpler and faster.

Automate the path to production

Every manual deployment step is a step someone will eventually get wrong at 6pm on a Friday.

A reasonable pipeline runs on every push: install dependencies, run linting and type checks, run tests, build, and deploy on success. Preview deployments for every branch make review concrete — a reviewer can click the change rather than imagine it.

This takes an afternoon to configure and removes a whole class of release incidents permanently.

Handle state with discipline

Most state bugs come from the same cause: the same information stored in two places that drift apart.

Keep a single source of truth. Derive values rather than duplicating them. Put state that should survive a page reload or be shareable into the URL, where it belongs. Treat server data as a cache to be invalidated rather than as application state to be synchronised by hand.

Make errors visible

Error handling is the part of a project that gets skipped and then causes the most expensive incidents.

Every network request needs a failure path. Every form needs a validation message that explains what to do rather than announcing that something went wrong. Error boundaries should stop a component failure taking down the page. Client-side error reporting should tell you about breakage before a customer does.

An application that fails clearly is far more trustworthy than one that fails silently.

What to skip

Equally important, a few things that absorb effort disproportionate to their return:

  • Micro-optimising re-renders before measuring that they are a problem
  • Custom design systems on a project with six pages
  • Microservices for a team of three
  • Server components everywhere when static HTML would do

The underlying principle: adopt complexity in response to a real constraint, not in anticipation of one.

If you want an outside read on whether your current build is applying these or fighting them, we are happy to take a look.