01 — Purpose

The server sets the clock

Frontend performance depends partly on backend delivery quality — slow responses affect perceived performance immediately.

Time to First Byte (TTFB) measures how long the browser waits before the first chunk of the response arrives. No amount of frontend optimisation fixes a server that takes two seconds to start sending HTML — users wait before CSS, fonts, or JavaScript even enter the picture.

See Core Web Vitals — TTFB influences LCP — and performance monitoring for field measurement.

02 — Principles

Backend latency is user-visible

Frontend performance is affected by backend architecture too.

  • caching strategies — edge, CDN, and application cache for repeat and static content
  • CDN delivery — serve HTML and assets close to users
  • efficient queries — database and API paths that do not block the response
  • reduced backend latency — trim middleware, serialisation, and cold starts

03 — Practice

Common problems and good practice

Slow APIs, blocking queries, excessive middleware, and poor caching show up in field data first.

  • measure TTFB in RUM — segment by route, region, and auth state
  • cache HTML or API responses where content is shared — invalidate deliberately
  • stream HTML early where SSR is used — do not wait for every downstream API
  • prefer static generation for content that does not change per request — see static vs SSR vs CSR
  • parallelise backend fetches — avoid waterfall APIs before first byte

04 — Avoid

Backend bottlenecks

Blaming the frontend for a slow server wastes engineering time.

  • slow APIs on the critical path — auth, config, or CMS blocking HTML
  • blocking queries — N+1 database calls during render
  • excessive middleware — logging, A/B, and feature flags before response start
  • poor caching — every request hits origin cold
  • ignoring TTFB in budgets — see performance budgets

05 — Close

Full-stack performance

Optimise the path from request to first byte with the same discipline as bundle size.

Profile a slow page end to end: DNS, TLS, TTFB, then frontend metrics. Fix the slowest segment first — often the server or an API on the critical path.

See static vs SSR vs CSR, frontend observability, and the performance review checklist.