Next.js Rendering Strategies: SSR, SSG and Dynamic Rendering
6 Aug 2026 · 8 min read · Advanced
- #Next.js
- #Performance
Share
The App Router blurs old “SSR vs SSG” labels. You still need a clear story for when HTML is produced and how often it is reused.
Static when content is known
Markdown blogs are a classic static case: read files at build time, generate params, ship HTML.
export async function generateStaticParams() {
return getAllArticleSlugs().map((slug) => ({ slug }));
}Static pages are fast and cache-friendly. They are wrong when every request needs personalized or rapidly changing data.
Dynamic when the request matters
Use dynamic rendering when you read request-time data (cookies, headers, search params that change output). Be explicit so caching behavior is intentional—not accidental.
Caching is part of the strategy
Think in layers:
- Full route cache / static output
fetchcache (when using fetch)- Client navigation cache
For file-based content modules (like fs + gray-matter), build-time generation is usually enough.
Streaming and suspense
Streaming improves TTFB perception for slow server work. Place Suspense boundaries around slow islands so the shell can paint early.
Choosing for a portfolio blog
| Content | Strategy |
|---|---|
| Article bodies from markdown | Static generation |
| Search / filters | Client state on static list data |
| Auth-only drafts | Dynamic + auth checks |
Conclusion
Pick the cheapest correct strategy. Static markdown with client-side filtering is often faster—and simpler—than making every blog interaction a server round-trip.