Angular lets you choose how each route is rendered: on the server for every request (SSR), at build time as static HTML (prerendering or SSG), or in the browser (CSR). You can combine these modes in one app. The right choice depends on whether content must be fresh or personalized, what your hosting can run, and how much work you want to move to build time or the browser.
How Angular’s rendering modes differ
Angular calls an app that mixes server-side rendering, prerendering, and client-side rendering a hybrid-rendered app. These are qualitative trade-offs, not guarantees of speed, search visibility, or cost; evaluate representative routes in your own deployment.
| Mode | When rendering happens | Best fit | Main trade-off |
|---|---|---|---|
| Server-side rendering (SSR) | On the server for each request | Frequently changing or request-specific content | Requires server rendering capacity and request-time work |
| Prerendering / static site generation (SSG) | At build time; Angular generates HTML documents | Stable public pages whose content is available at build time | Build time and output artifacts can grow with the number of generated routes; output cannot be personalized for the requesting user |
| Client-side rendering (CSR) | In the browser | Interactive or browser-dependent pages, including apps that fetch data client-side | Users must download, parse, and run JavaScript, and may wait for client-side data requests before the complete content appears |
SSR and prerendering can deliver rendered HTML before the browser finishes running the app. CSR avoids rendering pages on a server, but search crawlers may vary in their ability to execute JavaScript. Offline or service-worker applications may also favor CSR. Neither mode guarantees a particular search or performance result.
When to choose SSR, prerendering, or CSR
Choose SSR for request-specific or frequently changing pages
SSR is the natural option when a page needs current data or content tailored to the incoming request. Because the server renders each request, it can use request-specific information. Account for the server capacity and runtime behavior that this requires.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minute#1 Best Overall
Choose prerendering for shared content known at build time
Prerender pages such as stable public information that can be generated before deployment and served as static files. This avoids per-request page rendering, but the output is shared rather than personalized. Each route to generate adds work and potentially another document to the build artifact, so consider route count and content freshness.
Choose CSR when browser execution is part of the requirement
CSR suits routes that rely on browser-only code or whose content is fetched after the app starts. It avoids server-side page rendering, but the rendered content depends on JavaScript execution and any client-side requests. Consider that delay when deciding what users should see immediately.
Rank #2
Use different modes for different routes
There is no need to choose one mode for the entire app. For example, a team might render an interactive browser-dependent tool with CSR, prerender a stable public page, and use SSR for a profile page that varies by request. Treat this as a starting point: the page’s data needs, hosting, and measured behavior should decide the actual route configuration.
Configure rendering by route
Angular’s hybrid-rendering guide documents ng new --ssr when creating a project and ng add @angular/ssr for an existing one. Server routes are expressed as ServerRoute entries, commonly in app.routes.server.ts, and registered with the server-rendering providers. See Angular’s server and hybrid rendering guide for the current configuration API.
Rank #3
A route map assigns a rendering mode to each path. The exact route definitions and providers depend on your project setup and Angular version; the important decision is to match each path to its content and runtime needs.
Prerender parameterized routes
For routes with parameters, getPrerenderParams provides the parameter values Angular should use to generate documents at build time. If a requested path was not generated, a prerender route can define a fallback: server rendering, client rendering, or no fallback. Choose based on whether ungenerated paths must still work and what runtime your deployment supports.
Rank #4
Deploy a fully static output
For static hosting, Angular documents setting outputMode to "static". This produces prerendered HTML without generating a server file, so the result can be served from a static file server or CDN. This is appropriate only when the pages you need can be generated at build time; static output does not provide per-request personalization.
Hydration: reuse the rendered page in the browser
Hydration allows Angular to reuse the DOM produced by server rendering rather than discard it and render the page again. Without hydration, destroying and rebuilding the DOM can cause flicker and layout shifts. Angular’s hydration guide documents provideClientHydration for enabling hydration; Angular CLI’s SSR setup includes it. See Angular’s hydration guide.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsThe server and browser must produce consistent output for hydration to work reliably. Angular warns against using isPlatformBrowser in template conditionals to render different content on the server and client: the mismatch can interfere with hydration and cause layout shifts. Prefer platform-specific providers where possible, and avoid making the initial template depend on different server and browser conditions.
Server provider values and request isolation
Angular notes that top-level server provider values can persist across requests because application code is parsed and evaluated once. If a value must be created separately for each request, use a factory provider. This distinction matters when server-side state could otherwise be unintentionally shared between requests.
HTTP transfer cache
Angular can transfer eligible HTTP responses from SSR to hydration. By default, eligible GET and HEAD requests are transferred, but exclusions include authorization- or cookie-related credentials, cache-control directives such as no-store, no-cache, or private, and responses carrying Set-Cookie. The filtering details are version-sensitive; check the current Angular guide before relying on a particular request being cached.
Incremental hydration for deferred sections
Incremental hydration builds on SSR, hydration, deferrable views, and event replay. It lets deferred parts of a page remain dehydrated until a configured trigger tells Angular to hydrate them. That can defer browser work for sections that do not need to become interactive immediately, while keeping the server-rendered page available. Angular’s current guide says incremental hydration is enabled by default when using provideClientHydration, and event replay is enabled automatically; verify these defaults against your project’s Angular version. See Angular’s incremental hydration guide.
Make the decision against your real app
- Use SSR when request-time data or personalization is essential and you can operate server rendering.
- Use prerendering when content is shared, available at build time, and suitable for static delivery.
- Use CSR when browser-only behavior or client-side fetching is needed and the rendering delay is acceptable.
- Mix modes by route rather than imposing one strategy on pages with different requirements.
- Check that server and client initial output match, and verify hydration and transfer-cache behavior for your Angular version.
- Measure representative pages under your actual hosting and data conditions; the rendering mode alone does not establish a performance or SEO outcome.
For current details on routing and what happens after hydration, consult Angular’s rendering strategies guide. Its performance overview also discusses rendering, hydration, and incremental hydration.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




