You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on feedback from #56603, the `/` can be interpreted as file paths instead of filename separators / delimiters. We'll change them to use pipes `|` instead.
Alternatively, to revalidate all `fetch` requests in a route segment, you can use the [Segment Config Options](/docs/app/api-reference/file-conventions/route-segment-config).
109
109
110
-
```jsx filename="layout.js/ page.js"
110
+
```jsx filename="layout.js| page.js"
111
111
exportconstrevalidate=3600// revalidate at most every hour
112
112
```
113
113
@@ -250,7 +250,7 @@ If an error is thrown while attempting to revalidate data, the last successfully
250
250
251
251
To opt out of caching for individual `fetch` requests, you can set the `cache` option in `fetch` to `'no-store'`. This will fetch data dynamically, on every request.
252
252
253
-
```js filename="layout.js/ page.js"
253
+
```js filename="layout.js| page.js"
254
254
fetch('https://...', { cache:'no-store' })
255
255
```
256
256
@@ -262,7 +262,7 @@ If you have multiple `fetch` requests in a route segment (e.g. a Layout or Page)
262
262
263
263
For example, using `const dynamic = 'force-dynamic'` will cause all data to be fetched at request time, and the segment to be rendered dynamically.
Copy file name to clipboardExpand all lines: docs/02-app/01-building-your-application/06-optimizing/04-metadata.mdx
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ With both these options, Next.js will automatically generate the relevant `<head
21
21
22
22
To define static metadata, export a [`Metadata` object](/docs/app/api-reference/functions/generate-metadata#metadata-object) from a `layout.js` or static `page.js` file.
Control what happens when a dynamic segment is visited that was not generated with [generateStaticParams](/docs/app/api-reference/functions/generate-static-params).
0 commit comments