Six hundred bytes and an empty div
A recruiter pastes a job posting's link into a team chat, and the preview card shows the site's name and nothing else: no job title, no company, no salary. Fetch the same URL with curl and the reply is about 600 bytes: a generic title tag, one script tag, and an empty div with the id root. The job site is a single-page app. Everything a reader sees is built by 400 KB of JavaScript that runs in the browser, calls /api/jobs/8812, and only then writes the posting into that div.
That is client-side rendering (CSR): the server sends a near-empty page plus code, and the browser builds the HTML. It is the simplest to host, since the page and the bundle are static files, and once loaded the app moves between screens without full page loads. But the content's first paint waits for a chain: download the bundle, run it, call the API, render. And content that needs to be indexed or shared suffers: link previews and many crawlers see an empty shell, and search engines that do run JS index it later and less reliably. For a site whose postings are found through search and shared links, that is the wrong default for the posting page.
Every rendering strategy answers one question: where, and when, is this page's HTML built? In the browser after the page loads, on a server for each request, ahead of time at build, or on a server near the reader.
On the server, for every request
With server-side rendering (SSR), the server runs the page's components for each request, with the job's data in hand, and returns complete HTML: the title, the description, and the Open Graph tags that preview cards read. curl now shows the posting. The page is as fresh as the database, and the cost moves to the server: every request that no cache answers pays a data fetch and a render, so traffic turns into CPU.
The HTML that arrives looks finished, but it is not yet an app. The Apply button has no handler until the browser has done its own pass, called hydration:
- The browser requests
/jobs/8812. - The server loads the job, renders the components to HTML, and embeds the job's data in the page as JSON.
- The browser paints the HTML, and the reader sees the posting.
- The browser downloads the page's JavaScript and runs the same components with the embedded data.
- The framework walks the existing HTML and attaches event handlers to it, and the Apply button starts working.
SSR's hidden costs sit in those last steps. Between steps 3 and 5 the page looks ready, but controls that rely on JavaScript, like Apply, may not respond yet; on a slow phone that gap is longer. Here the browser still downloads all the code that builds the page, so SSR by itself speeds up first paint without shrinking the JavaScript, and the data travels twice, once as HTML and once as JSON. And the two renders must agree: a "posted 3 hours ago" computed with the server's clock can differ from the one the browser computes moments later. Frameworks report that as a hydration mismatch and, depending on the framework, patch it or re-render that part in the browser, discarding the server's work. Some frameworks cut the cost by hydrating only the interactive parts of a page, the "islands" Astro is built around, and leaving the rest as plain HTML.
Once, before anyone asks
Most posting pages are the same for every reader and change only when the employer edits them, so rendering them per request repeats the same work thousands of times. Static site generation (SSG) renders them once, at build time, and uploads the files, which a CDN serves with no server render at all: about as fast and cheap as a response gets, and one that does not depend on the application server staying up. Serving those files from storage behind a CDN is Static Content Hosting.
The build is where it hurts. With 40,000 open postings, every deploy re-renders all of them, and an employer who corrects a salary waits for the next build to see it live. Incremental regeneration keeps the static output but rebuilds pages one at a time. In Next.js, where it is called Incremental Static Regeneration, a page carries a revalidation interval, say 300 seconds: once it has passed, the next request still gets the old page and triggers a rebuild in the background, and requests after a successful rebuild get the new one. A closed job can therefore outlive its interval, so a rebuild can also be triggered on demand, when the employer saves.
At the edge, and why it was not faster
Search results cannot all be built ahead of time: the combinations of query, place and filters are endless. They are server-rendered in one region, in Virginia, and readers in São Paulo wait about 120 ms for each round trip before anything else happens. The team moves the search page to an edge runtime, so it renders in a data centre a few milliseconds from each reader, and São Paulo gets no faster.
Each search render makes three calls to the jobs API, one after another, and the API and its database are still in Virginia. Rendered there, those calls stay inside one data centre and take a few milliseconds each. Rendered in São Paulo, each one crosses the continent: about 360 ms in all, ignoring connection setup, against the 120 ms the move saved. Edge rendering runs SSR close to the user, with lower latency when the data is cached or replicated near the edge; if every render calls a distant origin, the round trips can cancel the gain. The fix is either to cache what the search page reads at the edge, such as facet counts and the results for popular queries, or to keep this page rendering next to its data. Edge runtimes also limit CPU time, APIs and libraries; Serverless & edge functions covers them.
Posting pages come pre-built from the CDN; the search page, before the fix, renders at the edge and still calls an API in one region.
A rule for every route
No single answer fits the whole site, and frameworks such as Next.js and Nuxt let each route choose. What keeps the mix workable is a rule per route that says where its HTML comes from and who may cache it:
- Landing and help pages: SSG, cached by the CDN for a long time and replaced on deploy.
- Job postings: SSG with incremental regeneration and an on-demand rebuild when the employer saves, or SSR behind a CDN that honours
Cache-Control: s-maxage=300, stale-while-revalidate=600and is purged when the employer saves; they have to preview and index well. - Search results: SSR with a short shared cache (
s-maxage=60), since the same query gives every reader the same page. - A candidate's applications: rendered per user, on the server or in the browser, with every response that carries them, HTML or API, marked
privateso no shared cache keeps a copy. - The employer's posting editor: CSR, behind a login, where nothing needs indexing and the page is mostly interaction.
The private on the applications page matters more than it looks. A personalized response stored at a shared edge can be served to the next reader who requests the same URL, with someone else's applications on it. CDN & static delivery names that leak, and HTTP caching: Cache-Control, ETags & revalidation covers how Cache-Control decides who may keep a copy and for how long.
Practising the delivery half
No Challenge yet asks for a rendering strategy per route, but the Content Delivery Network Challenge exercises the delivery half: pre-rendered postings in object storage behind the CDN, with long TTLs and a purge when a posting changes, and per-user pages sent to the origin. Write the Cache-Control of each kind of response on the Grid.