Unverified Commit be7dbc95 authored by Jam Balaya's avatar Jam Balaya Committed by GitHub

docs: update `cookies` reference url (#72151)

## Description
#69614 changes some anchor paths.
Then update the incorrect URLs.

### Improving Documentation

- [x] Run `pnpm prettier-fix` to fix formatting issues before opening
the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution
follows the docs guidelines:
https://nextjs.org/docs/community/contribution-guideCo-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
parent 1734e91a
......@@ -345,7 +345,7 @@ There are two ways you can invalidate the Router Cache:
- In a **Server Action**:
- Revalidating data on-demand by path with ([`revalidatePath`](/docs/app/api-reference/functions/revalidatePath)) or by cache tag with ([`revalidateTag`](/docs/app/api-reference/functions/revalidateTag))
- Using [`cookies.set`](/docs/app/api-reference/functions/cookies#methods) or [`cookies.delete`](/docs/app/api-reference/functions/cookies#methods) invalidates the Router Cache to prevent routes that use cookies from becoming stale (e.g. authentication).
- Using [`cookies.set`](/docs/app/api-reference/functions/cookies#setting-a-cookie) or [`cookies.delete`](/docs/app/api-reference/functions/cookies#deleting-cookies) invalidates the Router Cache to prevent routes that use cookies from becoming stale (e.g. authentication).
- Calling [`router.refresh`](/docs/app/api-reference/functions/use-router) will invalidate the Router Cache and make a new request to the server for the current route.
### Opting out
......
......@@ -32,7 +32,7 @@ description: Examples of popular Next.js UI patterns and use cases.
- [Passing additional values](/docs/app/building-your-application/data-fetching/server-actions-and-mutations#passing-additional-arguments)
- [Revalidating data](/docs/app/building-your-application/data-fetching/server-actions-and-mutations#revalidating-data)
- [Redirecting](/docs/app/building-your-application/data-fetching/server-actions-and-mutations#redirecting)
- [Setting cookies](/docs/app/api-reference/functions/cookies#methods)
- [Setting cookies](/docs/app/api-reference/functions/cookies#setting-a-cookie)
- [Deleting cookies](/docs/app/api-reference/functions/cookies#deleting-cookies)
### Metadata
......
......@@ -14,7 +14,7 @@ import {
export class ReadonlyRequestCookiesError extends Error {
constructor() {
super(
'Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#cookiessetname-value-options'
'Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options'
)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment