Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
a1420124
Unverified
Commit
a1420124
authored
May 20, 2024
by
Lee Robinson
Committed by
GitHub
May 20, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: clarify gSSP docs for runtime (#65962)
Replaces
https://github.com/vercel/next.js/pull/65948
.
parent
f95656a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
16 deletions
+0
-16
03-get-server-side-props.mdx
...application/03-data-fetching/03-get-server-side-props.mdx
+0
-16
No files found.
docs/03-pages/01-building-your-application/03-data-fetching/03-get-server-side-props.mdx
View file @
a1420124
...
@@ -81,22 +81,6 @@ If an error is thrown inside `getServerSideProps`, it will show the `pages/500.j
...
@@ -81,22 +81,6 @@ If an error is thrown inside `getServerSideProps`, it will show the `pages/500.j
## Edge Cases
## Edge Cases
### Edge Runtime
`getServerSideProps`
can
be
used
with
both
[
Serverless
and
Edge
Runtimes
](
/
docs
/
pages
/
building
-
your
-
application
/
rendering
/
edge
-
and
-
nodejs
-
runtimes
),
and
you
can
set
props
in
both
.
However
,
currently
in
the
Edge
Runtime
,
you
do
not
have
access
to
the
response
object
.
This
means
that
you
cannot
—
for
example
—
add
cookies
in
`getServerSideProps`
.
To
have
access
to
the
response
object
,
you
should
**
continue
to
use
the
Node
.
js
runtime
**
,
which
is
the
default
runtime
.
You
can
explicitly
set
the
runtime
on
a
per
-
page
basis
by
modifying
the
`config`
,
for
example
:
```jsx filename="pages/index.js"
export const config = {
runtime: 'nodejs', // or "edge"
}
export const getServerSideProps = async () => {}
```
### Caching with Server-Side Rendering (SSR)
### Caching with Server-Side Rendering (SSR)
You
can
use
caching
headers
(
`Cache-Control`
)
inside
`getServerSideProps`
to
cache
dynamic
responses
.
For
example
,
using
[
`stale-while-revalidate`
](
https
://
web
.
dev
/
stale
-
while
-
revalidate
/
)
.
You
can
use
caching
headers
(
`Cache-Control`
)
inside
`getServerSideProps`
to
cache
dynamic
responses
.
For
example
,
using
[
`stale-while-revalidate`
](
https
://
web
.
dev
/
stale
-
while
-
revalidate
/
)
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment