High-cardinality sites can't pre-render every slug. Without generateStaticParams, every visit shows a Suspense fallback. With it, unknown slugs block while generating.
experimental.partialFallbacks gives unknown slugs an instant shell from CDN while dynamic data streams in. After the first visit, the page is upgraded to fully static.
next.config.ts
1
constnextConfig={
2
experimental: {
3
partialFallbacks:true,
4
},
5
};
Demo
A product catalog with 9 products. Only 3 are in generateStaticParams.
Build-time products (1–3) load instantly with no fallback.
Request-time products (4–9) get a unique slug suffix on page load (persisted in session). Click one to see the streaming fallback, then click it again or refresh the page to see the cached result.
An artificial 2 second delay makes the difference more noticeable.
Notes
This demo uses the experimental partialFallbacks flag and the use cache directive.
This page was rendered with a 2 second artificial delay. If this product was pre-rendered, it loaded instantly. If it was runtime-discovered, the behavior depends on whether partialFallbacks is enabled.