diff --git a/docs/02-app/01-building-your-application/02-data-fetching/03-server-actions.mdx b/docs/02-app/01-building-your-application/02-data-fetching/03-server-actions.mdx
index 05d3afa94291b..68203cf85c507 100644
--- a/docs/02-app/01-building-your-application/02-data-fetching/03-server-actions.mdx
+++ b/docs/02-app/01-building-your-application/02-data-fetching/03-server-actions.mdx
@@ -548,6 +548,22 @@ async function create(data) {
}
```
+### Redirection
+
+You can also trigger a redirection within a Server Action by using the `redirect` function.
+
+```js highlight={8}
+import { redirect } from 'next/navigation'
+
+async function addItem(data) {
+ 'use server'
+
+ await saveToDb({ data })
+
+ redirect('/success')
+}
+```
+
## Glossary
### Actions
diff --git a/docs/02-app/01-building-your-application/07-configuring/06-src-directory.mdx b/docs/02-app/01-building-your-application/07-configuring/06-src-directory.mdx
index babc8381477dd..20a22f1f1b0c9 100644
--- a/docs/02-app/01-building-your-application/07-configuring/06-src-directory.mdx
+++ b/docs/02-app/01-building-your-application/07-configuring/06-src-directory.mdx
@@ -10,7 +10,7 @@ related:
As an alternative to having the special Next.js `app` or `pages` directories in the root of your project, Next.js also supports the common pattern of placing application code under the `src` directory.
-This separates application code from project configuration files which mostly live in the root of a project. Which is preferred by some individuals and teams.
+This separates application code from project configuration files which mostly live in the root of a project, which is preferred by some individuals and teams.
To use the `src` directory, move the `app` Router folder or `pages` Router folder to `src/app` or `src/pages` respectively.
diff --git a/docs/02-app/01-building-your-application/08-deploying/01-static-exports.mdx b/docs/02-app/01-building-your-application/08-deploying/01-static-exports.mdx
index 578a2f7352f84..2d92ff3a91d48 100644
--- a/docs/02-app/01-building-your-application/08-deploying/01-static-exports.mdx
+++ b/docs/02-app/01-building-your-application/08-deploying/01-static-exports.mdx
@@ -289,6 +289,7 @@ With this configuration, your application **will produce an error** if you try t
The following additional dynamic features are not supported with a static export:
+- [Dynamic Routes](https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes) without `generateStaticParams()`
- `rewrites` in `next.config.js`
- `redirects` in `next.config.js`
- `headers` in `next.config.js`
diff --git a/docs/02-app/02-api-reference/04-functions/cookies.mdx b/docs/02-app/02-api-reference/04-functions/cookies.mdx
index c9d88f79d985d..78570764a3379 100644
--- a/docs/02-app/02-api-reference/04-functions/cookies.mdx
+++ b/docs/02-app/02-api-reference/04-functions/cookies.mdx
@@ -85,26 +85,70 @@ async function create(data) {
## Deleting cookies
-To "delete" a cookie, you must set a new cookie with the same name and an empty value. You can also set the `maxAge` to `0` to expire the cookie immediately.
+> **Good to know**: You can only delete cookies in a [Server Action](/docs/app/building-your-application/data-fetching/server-actions) or [Route Handler](/docs/app/building-your-application/routing/route-handlers).
+
+There are several options for deleting a cookie:
+
+### `cookies().delete(name)`
+
+You can explicitly delete a cookie with a given name.
+
+```js filename="app/actions.js"
+'use server'
+
+import { cookies } from 'next/headers'
+
+async function create(data) {
+ cookies().delete('name')
+}
+```
+
+### `cookies().set(name, '')`
+
+Alternatively, you can set a new cookie with the same name and an empty value.
+
+```js filename="app/actions.js"
+'use server'
+
+import { cookies } from 'next/headers'
+
+async function create(data) {
+ cookies().set('name', '')
+}
+```
> **Good to know**: `.set()` is only available in a [Server Action](/docs/app/building-your-application/data-fetching/server-actions) or [Route Handler](/docs/app/building-your-application/routing/route-handlers).
+### `cookies().set(name, value, { maxAge: 0 })`
+
+Setting `maxAge` to 0 will immediately expire a cookie.
+
```js filename="app/actions.js"
'use server'
import { cookies } from 'next/headers'
async function create(data) {
- cookies().set({
- name: 'name',
- value: '',
- expires: new Date('2016-10-05'),
- path: '/', // For all paths
- })
+ cookies().set('name', 'value', { maxAge: 0 })
+}
+```
+
+### `cookies().set(name, value, { expires: timestamp })`
+
+Setting `expires` to any value in the past will immediately expire a cookie.
+
+```js filename="app/actions.js"
+'use server'
+
+import { cookies } from 'next/headers'
+
+async function create(data) {
+ const oneDay = 24 * 60 * 60 * 1000
+ cookies().set('name', 'value', { expires: Date.now() - oneDay })
}
```
-You can only set cookies that belong to the same domain from which `.set()` is called. Additionally, the code must be executed on the same protocol (HTTP or HTTPS) as the cookie you want to update.
+> **Good to know**: You can only delete cookies that belong to the same domain from which `.set()` is called. Additionally, the code must be executed on the same protocol (HTTP or HTTPS) as the cookie you want to delete.
## Version History
diff --git a/examples/cms-enterspeed/README.md b/examples/cms-enterspeed/README.md
index f2c1807d172a3..0c686327ba898 100644
--- a/examples/cms-enterspeed/README.md
+++ b/examples/cms-enterspeed/README.md
@@ -4,7 +4,7 @@ This example showcases Next.js's [Static Generation](https://nextjs.org/docs/bas
## Demo
-### [https://next-blog-wordpress.vercel.app](https://next-blog-wordpress.vercel.app)
+### [https://next-blog-demo.enterspeed.com/](https://next-blog-demo.enterspeed.com/)
## Deploy your own
diff --git a/examples/with-supabase/app/_examples/protected-route/page.tsx b/examples/with-supabase/app/_examples/protected-route/page.tsx
deleted file mode 100644
index b3df6cf820f1a..0000000000000
--- a/examples/with-supabase/app/_examples/protected-route/page.tsx
+++ /dev/null
@@ -1,83 +0,0 @@
-// TODO: Duplicate or move this file outside the `_examples` folder to make it a route
-
-import {
- createServerActionClient,
- createServerComponentClient,
-} from '@supabase/auth-helpers-nextjs'
-import { cookies } from 'next/headers'
-import Image from 'next/image'
-import { redirect } from 'next/navigation'
-
-export const dynamic = 'force-dynamic'
-
-export default async function ProtectedRoute() {
- const supabase = createServerComponentClient({ cookies })
-
- const {
- data: { user },
- } = await supabase.auth.getUser()
-
- if (!user) {
- // This route can only be accessed by authenticated users.
- // Unauthenticated users will be redirected to the `/login` route.
- redirect('/login')
- }
-
- const signOut = async () => {
- 'use server'
- const supabase = createServerActionClient({ cookies })
- await supabase.auth.signOut()
- redirect('/login')
- }
-
- return (
-