Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › caching

Why ISR Pages Go Stale: Time-Based Revalidation Waits for a Visit, but Visits Aren’t the Only Cause

By Freedom251 Team · · 5 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

An Incremental Static Regeneration (ISR) page is not stale because ISR is broken. In Next.js’s documented time-based flow, a revalidation interval does not rebuild the page the moment its timer expires. The regeneration starts when a later request arrives. Until then, the page keeps serving its last successfully generated version. A page that nobody requests therefore stays at that version, which is the core of the headline’s point. But “nobody visited it” is only one of several ways an ISR page can look old, and the fixes differ depending on which one applies.

How time-based revalidation actually works

In the Next.js App Router, you set a revalidation interval on the route, for example with export const revalidate = 60. In the Pages Router, the same idea is expressed as the revalidate value returned from getStaticProps. Either way, the interval marks the cached result as eligible for revalidation. It does not schedule a background job that rebuilds the page at expiry.

As an Amazon Associate I earn from qualifying purchases.

The documented sequence looks like this:

  1. The page is generated and cached. The first build or first request produces a version and stores it.
  2. The interval passes with no traffic. Nothing happens to the route. The cached version is still the one on file.
  3. A request arrives after the interval. The request can receive the stale cached version immediately while Next.js regenerates the page in the background.
  4. Regeneration succeeds. The new version replaces the cached one. Next.js’s documentation puts it this way: “Once the new version is successfully generated, it replaces the cached version, and subsequent visitors will receive the updated content.” (Next.js App Router ISR guide)

The practical consequence is that the first visitor after expiry may see older content, and the second visitor usually sees the newer content. The documentation does not establish a fixed maximum age for a page that receives no requests. Its age is determined by when the last successful regeneration happened. A public r/nextjs thread asks whether pages could be “months or years out of date” if nobody has visited a URL for a while. That is a reader’s question, not documented behavior, and the time-based flow above answers it only in the sense that regeneration waits for a request. (r/nextjs discussion)

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why a page can stay old for other reasons

Traffic is one cause. Four others matter more often in real projects, and each one looks identical from the browser:

  • On-demand invalidation never reached the page. Your content-change webhook or server action may call the wrong path or tag, so the cached entry is never marked for refresh.
  • Regeneration failed. If the new render throws or the data source is unavailable, the last successful version remains in place. The documentation states that a failed attempt keeps the last successful data available, so the page looks unchanged rather than broken.
  • Another cache sits in front of Next.js. A CDN, reverse proxy, or browser cache can keep serving a response that Next.js has already replaced.
  • The deployment has more than one cache. Self-hosted or multi-instance setups may keep cache entries per instance, so one server regenerates while another continues serving its own copy.

Forcing an update without waiting for a visit

When content changes and you cannot wait for traffic to trigger regeneration, use on-demand revalidation. The method depends on the router.

App Router: revalidatePath and revalidateTag

The App Router guide describes revalidatePath, which invalidates the cache for a path, and revalidateTag, which invalidates cached data associated with a tag. Invalidation and regeneration are not the same moment. The guide says regeneration happens on the next request, so calling the function marks the entry, and the visitor who triggers the next request is the one who causes the rebuild. (Next.js App Router ISR guide)

Rank #2
Sale
HTML and CSS: Design and Build Websites
  • HTML CSS Design and Build Web Sites
  • Comes with secure packaging
  • It can be a gift option

Pages Router: res.revalidate

The Pages Router guide documents res.revalidate for on-demand work. It is a separate API from the App Router functions above, so do not assume the same call works across routers. (Next.js Pages Router ISR guide)

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Time-based versus on-demand revalidation

The two mechanisms differ in what starts regeneration and what the triggering request receives.

Comparison point Time-based revalidation On-demand revalidation
Trigger Elapsed interval, followed by a later request An explicit application event, such as a webhook or server action
Invalidation scope The route’s cached result, as configured for that route A path (revalidatePath) or tag (revalidateTag) in the App Router; the res.revalidate target in the Pages Router
What the triggering request sees The stale cached version while regeneration runs in the background, per the documented flow The documented App Router guide says regeneration happens on the next request; the exact response to that request is not stated in the sources reviewed for this article
Operational dependency Traffic reaching the route after the interval A working webhook or action that calls the correct path or tag

Behavior can vary by Next.js version. The Next.js 15 caching guide is versioned and useful for the concept, but check the caching documentation for your installed release before relying on exact semantics. (Next.js 15 caching guide)

Diagnosing a page that still looks old

Work through these checks in order. Each one rules out a different cause.

Rank #4
Sale
Web Design with HTML, CSS, JavaScript and jQuery Set
  • Brand: Wiley
  • Set of 2 Volumes
  • A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers
  1. Confirm the revalidation mode. Identify whether the route uses a time-based interval, on-demand invalidation only, or both.
  2. Confirm the invalidation target. Check that your webhook or action calls revalidatePath or revalidateTag with the exact path or tag the page uses. A trailing slash or a mismatched tag is enough to miss the entry.
  3. Trigger one request and read the server logs. Look for a regeneration that succeeded or an error that prevented it.
  4. Check cache hits and misses. The current ISR guide notes that logging can show cache hits and misses, which tells you whether the second request was served from the new version.
  5. Test in production mode. The Pages Router guide recommends verifying with next build followed by next start. Development mode does not reproduce production caching.
  6. Check layers outside Next.js. Inspect any CDN or proxy cache in front of the app and purge it if it is holding the old response.

Self-hosting and multi-instance deployments

If you run Next.js on your own infrastructure, validate the cache layers and any shared or persistent cache configuration that apply to your setup. The official self-hosting guide in the Next.js repository covers this area and is the right reference for your deployment. (Next.js self-hosting guide) The source material reviewed for this article did not examine any particular deployment architecture, so which layer causes staleness in your system must be established by testing that system.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What the official sources do and do not establish

The Next.js documentation gives example intervals, including 60 seconds and one hour. These are illustrative configuration values, not measured rates or recommended settings for every site. No independent study was found that measures how often ISR pages remain stale because no request reached them, so the article does not offer a prevalence figure.

The official pages also cover the App Router and Pages Router separately. Do not treat their APIs or caching semantics as interchangeable.

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.

cachingIncremental Static RegenerationISRNext.jsrevalidationWeb development

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.