A shopper opens a page for a ceramic mug. The description says it holds 300 ml. The stock counter says there’s one blue mug left. The shopper taps the green swatch and expects the photo to change immediately. All three details share a screen, but each has a different deadline. The mug’s capacity was known before anyone visited. Its availability matters the moment someone wants to buy. The color choice only becomes known when someone taps.
That’s the decision behind web rendering. A site can prepare HTML ahead of time, assemble it when a request arrives, or let JavaScript build part of the interface in the browser. What makes one approach a good fit depends on what the visitor came to do.
Static generation does the work before the visit
With static site generation (SSG), the site turns content and templates into HTML ahead of time. When a shopper opens the mug page, a content delivery network (CDN) can serve a ready-made copy from a nearby location. The browser can start displaying the description as the HTML arrives. A hundred people can read the care instructions without the shop querying its catalog a hundred times. web.dev
The interesting question is what happens when an editor makes a correction. Suppose the mug was listed as dishwasher-safe and the potter changes the instructions to “hand wash only.” How long until shoppers see the correction? A nightly build could leave the old advice online for the rest of the day. A publishing system that regenerates the page and refreshes its cached copies when the editor clicks Publish can make that window much shorter. web.dev
That makes static generation a natural fit for articles, documentation, and product guides. Even a busy newsroom can generate each story when it’s published. The useful question is whether every reader can receive the same copy until the next edit.
Server-side rendering does the work when someone asks
With server-side rendering (SSR), the server can use details from an incoming request to decide what goes into the HTML it sends back. Imagine the shopper follows a link to the blue mug and has already selected a Bangkok pickup location. The server can check that branch’s inventory and include “Available for pickup in Bangkok” in the first response. The shopper gets an answer without waiting for the browser to make a second inventory request. web.dev
That lookup has a cost. If the server waits for a slow inventory system before sending any HTML, the shopper waits too. Saving a rendered response in a cache lets later visitors reuse it. The shop then has two decisions to make. How long is the answer useful, and which visitors does it apply to? A stock figure for Bangkok could be perfectly current and still be the wrong answer for someone collecting in Singapore. MDN
Even a freshly rendered page captures a moment in time. Two shoppers can both see “one left” while the mug is still on the shelf. The shop has to check and reserve stock when it accepts an order. Rendering determines what the shopper sees. The ordering system determines who gets the mug.
Client-side rendering puts the browser to work
With client-side rendering (CSR), JavaScript running in the browser builds or updates the interface. On a fully client-rendered page, the first response may contain little more than an empty container and a reference to a script. The browser downloads and runs the script, fetches any data it still needs, and creates the visible content. On a slow phone or an unreliable connection, the shopper may spend that time looking at a loading indicator. web.dev
The payoff is easier to see on the second click. Suppose the browser already has the details for each glaze. When the shopper taps green, it can switch the selected swatch and show the matching photo without reloading the description or losing the shopper’s place. If pickup availability for the green mug needs a fresh lookup, just that part of the page needs a loading message.
This is also where rendering approaches can meet. A server can send HTML with the swatches already visible, and JavaScript can make them respond to taps. In frameworks such as React, attaching the application to that existing HTML is called hydration. It explains a familiar frustration on slower devices. A swatch can look ready before tapping it does anything. Try tapping the first swatch the instant you see it. That tells you something a screenshot never will. React
How to choose, page by page
| What the visitor wants to do | A good starting point | What triggers new work? |
|---|---|---|
| Read a guide to caring for handmade ceramics | Static generation | An editor publishes a correction or adds a care tip. |
| Open a product link and see pickup availability at a chosen branch | Server-side rendering | The request identifies the product and branch, and the server looks up the relevant stock. |
| Compare glaze colors without losing their place | Client-side updates | A tap changes the selection. The browser can reuse product details it already has. |
| Browse products, then switch among local shops | A mix of approaches | Prepare the catalog ahead of time, show initial stock for a known branch, and refresh availability when the shopper switches shops. |
A revealing test is to open the product link on a phone with a slow connection and try to find out whether you can pick up a green mug today. Watch for three moments. When can you tell you’re on the right product? When does tapping green work? When do you have a pickup answer for your branch? A page can do well on the first question and leave you waiting on the other two.
Conclusion
The mug’s capacity, the last item on the shelf, and the shopper’s choice of glaze each become known at a different time. That timing gives you a practical way to choose a rendering strategy. Prepare shared content when it’s published, use the request when the first view depends on current or personal information, and let the browser handle choices people make after arrival. From the shopper’s perspective, it’s one straightforward visit. They can read about the mug, choose a color, and see where to pick it up.

Leave a Reply