---
title: "Why is my fetch data stale in the Next.js App Router?"
description: "Your data changed but the page did not. Learn why App Router routes get prerendered or cached, and how to revalidate with time-based or on-demand revalidation."
url: https://www.danny.engineering/answer/nextjs/why-is-my-fetch-data-stale-in-the-nextjs-app-router
author: Danny
published: 2026-11-27T00:00:00.000Z
updated: 2026-11-27T17:25:00.000Z
tags: ["Next.js"]
---

# Why is my fetch data stale in the Next.js App Router?

## The short answer


Usually the fetch is not the problem: the whole route was prerendered at build time, so the HTML holds the data from that moment. Tell Next.js how fresh the data must be. Either revalidate it on a timer, revalidate it on demand when the data changes, or make the route render on every request.


```typescript
// app/products/page.tsx
export default async function Page() {
  const res = await fetch('https://api.example.com/products', {
    next: { revalidate: 60 }, // refresh at most once a minute
  });
  const products = await res.json();
  return <ProductList products={products} />;
}
```


## Why it happens


Next.js tries to render routes ahead of time. During `next build`, any route that does not read request-specific data (cookies, headers, search params) is rendered once and the result is stored. Visitors get that stored HTML until something tells Next.js to render again.


Since Next.js 15, `fetch` responses are not cached by default. That surprises people, because a page can still look stale: the fetch ran once at build time, and the prerendered page is what is being served. In development, pages render on every request, so the problem often only shows up in production.


If your app has Cache Components turned on (the `cacheComponents` option in Next.js 16), the model is different. Data is dynamic unless you opt into caching with the `'use cache'` directive, and the freshness of cached data is set with `cacheLife` and invalidated with tags.


There is also a client-side Router Cache. When you navigate back to a page you visited, the browser may reuse the payload it already has. After a mutation, refresh it with `router.refresh()` or by revalidating from a Server Action.


## How to fix it


### Revalidate on a timer


Add `next.revalidate` to the fetch, as in the short answer. The first visitor after the window passes still sees the old page, and Next.js renders a fresh version in the background for the next visitor. This is stale-while-revalidate, and it suits content that can be a little out of date, such as a blog or product listing.


### Revalidate on demand with tags


When you know exactly when data changes, for example after a CMS publish or a form submission, tag the fetch and invalidate the tag.


```typescript
// Reading the data
const res = await fetch('https://api.example.com/products', {
  next: { tags: ['products'] },
});
```


```typescript
// app/actions.ts
'use server';

import { revalidateTag, revalidatePath } from 'next/cache';

export async function saveProduct(formData: FormData) {
  await db.products.update(/* ... */);
  revalidateTag('products', 'max');
  // or revalidate a single route
  revalidatePath('/products');
}
```


In Next.js 16, `revalidateTag` takes a second argument, a `cacheLife` profile such as `'max'`, which serves the old data while the new data loads. The single-argument form is deprecated. If you need the user to see their own change straight away inside a Server Action, Next.js 16 also offers `updateTag`, which expires the entry immediately. On Next.js 15, call `revalidateTag('products')` with one argument.


### Render on every request


For data that must always be live, such as a stock level or a user dashboard, render the route dynamically. Calling `connection()` from `next/server` before the fetch tells Next.js the route depends on the incoming request.


```typescript
import { connection } from 'next/server';

export default async function Page() {
  await connection();
  const res = await fetch('https://api.example.com/stock');
  const stock = await res.json();
  return <Stock data={stock} />;
}
```


Without Cache Components, `export const dynamic = 'force-dynamic'` in the page file does the same thing for the whole route.


## Common pitfalls

- Testing caching with `next dev`. Development renders every request, so build and run with `next build` and `next start` to see real behaviour.
- Revalidating a path that does not match the route. `revalidatePath('/products')` does not revalidate `/products/123` unless you pass the dynamic segment pattern and the `'page'` type.
- Forgetting that data fetched with a database client or SDK, not `fetch`, is not affected by fetch options. Use route segment config, `'use cache'`, or tags on your own cached functions instead.
- Calling `revalidateTag` in a Client Component. It only works on the server, in Server Actions or Route Handlers.

## Related reading

- [Next.js: Caching and revalidating](https://nextjs.org/docs/app/getting-started/caching-and-revalidating)
- [Next.js: revalidateTag](https://nextjs.org/docs/app/api-reference/functions/revalidateTag)
