Keeping Static Sites Fresh: A Practical Guide to Vercel’s Incremental Static Regeneration
Static sites are fast but can become stale. Vercel’s Incremental Static Regeneration lets you refresh pages on demand, keeping performance while updating content. Learn how to enable ISR, use cases, trade‑offs, and next steps.
22 Jul 2025, 11:05 UTC

Problem: Static Speed Meets Stale Content
Static sites are the gold‑standard for speed and SEO: every page is pre‑rendered, served from a CDN, and loads in milliseconds. The catch? When the underlying data changes—think a product catalog or a blog post—those pages stay frozen until you rebuild the entire site. For content‑heavy sites this rebuild can be costly and slow.
Thesis: ISR Lets You Regenerate on Demand
Incremental Static Regeneration (ISR) is Vercel’s answer to the “fast but stale” problem. It keeps the static‑first performance while allowing pages to be refreshed in the background whenever new data arrives, without a full rebuild.
1. How ISR Works
- Build time: Vercel runs
getStaticPropsfor each page, generating the initial static HTML and JSON payload. - Runtime request: A user requests the page. If the cached version is still fresh, it’s served immediately.
- Revalidation trigger: After the
revalidateinterval passes, the next request triggers a background regeneration. The old page is still served until the new build finishes. - Updated page: Once regeneration completes, the CDN caches the new static files and future requests get the fresh content.
ISR is available only for Next.js projects deployed on Vercel and requires Next.js 10 or newer.
2. Enabling ISR in a Next.js Project
// pages/products.js
import fetch from 'node-fetch';
export async function getStaticProps() {
const res = await fetch('https://api.example.com/products');
const products = await res.json();
return {
props: { products },
// Re‑generate this page every 60 seconds
revalidate: 60,
};
}
export default function Products({ products }) {
return (
<ul>
{products.map(p => ( {p.name} ))}
</ul>
);
}
Deploy with vercel --prod (requires Vercel CLI authentication). The revalidate key tells Vercel to keep the page fresh every 60 seconds.
Running Locally
During local development (vercel dev), ISR behaves like a normal static build; the revalidate interval is ignored. To test revalidation, you must deploy to Vercel.
Verification Steps
- After deployment, change a product in your data source.
- Wait at least
revalidateseconds (e.g., 60). - Reload the page. The new product should appear.
- Check the Vercel dashboard under Deployments > Logs for entries labeled ISR revalidation to confirm regeneration.
3. Typical Use Cases
- Product catalogs that update daily but don't need instant freshness.
- Blog or news sites where new articles are added infrequently.
- Pricing pages that change on a schedule.
Performance & Cost Snapshot
| Metric | Static Build | ISR After Revalidate |
|---|---|---|
| First load latency | ∼10 ms | ∼10 ms (cached) |
| Revalidation cost | 0 € | ≈0.01 € per regeneration (edge function) |
| Data freshness window | Instant on rebuild | ≤ revalidate interval |
4. Trade‑offs and Limitations
- Staleness window: Updates are delayed by up to the
revalidateperiod. Choose a value that balances freshness with cost. - Runtime cost: Each regeneration triggers an edge function, which may increase deployment costs if the page is hit frequently.
- Platform dependency: ISR is Vercel‑only for Next.js. Other frameworks or hosts may not support it.
- Non‑dynamic data: For truly real‑time content, consider client‑side fetching or Server‑Side Rendering.
Actionable Next Steps
- Identify pages that benefit most from ISR (rare updates, high traffic).
- Set
revalidateto a sensible interval (e.g., 60 s for product lists). - Deploy to Vercel and monitor the ISR revalidation logs.
- Tune the interval based on observed staleness and cost.
- If you need instant updates, combine ISR with a Vercel Edge Function to trigger revalidation on data changes.
By enabling ISR, you keep the speed advantage of static sites while ensuring your content stays reasonably current—all without the overhead of full rebuilds.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.