---
title: prefetch
description: API reference for the prefetch route segment config.
url: "https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config/prefetch"
docs_index: /docs/llms.txt
version: 16.3.0-canary.80
lastUpdated: 2026-06-25
prerequisites:
  - "File-system conventions: /docs/app/api-reference/file-conventions"
  - "Route Segment Config: /docs/app/api-reference/file-conventions/route-segment-config"
related:
  - app/guides/instant-navigation
  - app/api-reference/file-conventions/route-segment-config/instant
---


> For an index of all Next.js documentation, see [/docs/llms.txt](/docs/llms.txt).
The `prefetch` route segment config controls how a segment is prefetched during client-side navigation. By default, the framework manages the strategy based on the app's [`partialPrefetching`](/docs/app/api-reference/config/next-config-js/partialPrefetching) setting. To override per segment, set this export to one of the values below.

> **Good to know**:
>
> * The `prefetch` export only works when [`cacheComponents`](/docs/app/api-reference/config/next-config-js/cacheComponents) is enabled.
> * `prefetch` cannot be used when the segment is a Client Component.
> * The meaningful values to set are `'allow-runtime'`, `'partial'`, and `'force-disabled'`. `'auto'` is the default and is equivalent to omitting the export; don't write `prefetch = 'auto'` explicitly.

```tsx filename="layout.tsx | page.tsx" switcher
export const prefetch = 'allow-runtime'

export default function Page() {
  return <div>...</div>
}
```

```jsx filename="layout.js | page.js" switcher
export const prefetch = 'allow-runtime'

export default function Page() {
  return <div>...</div>
}
```

## Options

### `'allow-runtime'`

Allows Next.js to prefetch this segment at runtime. Setting this option lets the server render a fresh response that resolves per-link runtime data: `params`, `searchParams`, and the full URL. Cookies and headers don't need `'allow-runtime'`. The framework already includes them in the [App Shell](/docs/app/glossary#app-shell) when the route reads them. Use this for personalized content when the latency and cost of runtime prefetching are appropriate for the segment.

> **Good to know**: When Next.js runtime-prefetches a segment, all downstream segments are included in the same runtime prefetch request. Segments deeper in the tree that are configured with `'force-disabled'` will still be prefetched as part of the runtime response.

```tsx filename="page.tsx"
export const prefetch = 'allow-runtime'
```

### `'partial'`

Opts the segment into [Partial Prefetching](/docs/app/guides/adopting-partial-prefetching) without enabling the global [`partialPrefetching`](/docs/app/api-reference/config/next-config-js/partialPrefetching) flag. A `<Link>` pointing at a segment with `prefetch = 'partial'` loads the per-route [App Shell](/docs/app/glossary#app-shell) instead of the legacy full prefetch. Set this on the destination, not the link.

Use this for incremental adoption when you can't enable `partialPrefetching` for the entire app at once. Once every route in scope has `prefetch = 'partial'`, enable the global flag and remove the per-route exports.

```tsx filename="page.tsx"
export const prefetch = 'partial'
```

### `'force-disabled'`

Never prefetch this segment. The client will not request segment data ahead of navigation. Use this for segments where prefetching would be wasteful, for example pages behind authentication that are rarely visited.

> **Good to know**: `'force-disabled'` does not prevent Next.js from prefetching metadata about the route. However, the actual segment data for this segment and all deeper segments will be omitted from prefetching.

## Relationship with the `<Link prefetch>` prop

A prefetch starts with a `<Link>` that expresses intent (should this destination be prefetched, and how eagerly), and ends at a segment that sets a cost ceiling (how much work is it OK to do ahead of time, for any link that points here).

A destination can't know which links target it, so the segment config caps what any `<Link prefetch={true}>` pulls:

* [`'allow-runtime'`](#allow-runtime): App Shell plus per-link runtime data (`params`, `searchParams`, the full URL).
* [`'partial'`](#partial): App Shell only.
* [`'force-disabled'`](#force-disabled): skip segment data entirely.

`<Link prefetch={false}>` skips prefetching at the link level regardless of how the destination is configured.

> **Good to know**: A prefetch may be served from a CDN cache, reuse a cached App Shell, or run a fresh server render. Wider prefetches lean toward fresh server work and cost more server CPU per page view.

## TypeScript

```tsx
type Prefetch = 'auto' | 'allow-runtime' | 'partial' | 'force-disabled'

export const prefetch: Prefetch = 'allow-runtime'
```

## Version History

| Version   | Changes                                              |
| --------- | ---------------------------------------------------- |
| `v16.x.x` | `prefetch` export introduced (Cache Components only) |
## Next Steps

Learn how to use instant navigations in practice.

- [Instant navigation](/docs/app/guides/instant-navigation)
  - Learn how to structure your app to prefetch and prerender more content, providing instant page loads and client navigations.
- [instant](/docs/app/api-reference/file-conventions/route-segment-config/instant)
  - API reference for the instant route segment config.

---

For a semantic overview of all documentation, see [/docs/sitemap.md](/docs/sitemap.md)

For an index of all available documentation, see [/docs/llms.txt](/docs/llms.txt)