Engineering Lab

Ideas, experiments, and engineering decisions in practice.

Where should a page render?

The same page, delivered three ways. Pick a strategy, then change the network and the API speed.

Strategy

Server-side rendering

HTML is built on the server for every request, next to the API.

Fresh data on every request and content early, but the server waits on the API first, and the page can look ready before it responds.

Content at 750 ms, responds at 1.9 s

requestdataBrowserCDNServerAPI
Network
  1. Client-side rendering

    Content 1.9 s, responds 1.9 s

  2. Server-side rendering

    Content 750 ms, responds 1.9 s

  3. Static generation

    Content 420 ms, responds 680 ms