Skip to content

Commit 9776e7c

Browse files
hyunbinseoteemingc
andauthored
docs: elaborate on setHeaders in SSR (#12888)
* docs: elaborate on setHeaders in SSR * Update documentation/docs/20-core-concepts/20-load.md * docs: update expression * Update documentation/docs/20-core-concepts/20-load.md --------- Co-authored-by: Tee Ming <[email protected]>
1 parent 162d8ac commit 9776e7c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

documentation/docs/20-core-concepts/20-load.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,8 @@ export async function load({ fetch, setHeaders }) {
322322
const url = `https://cms.example.com/products.json`;
323323
const response = await fetch(url);
324324

325-
// cache the page for the same length of time
326-
// as the underlying data
325+
// Headers are only set during SSR, caching the page's HTML
326+
// for the same length of time as the underlying data.
327327
setHeaders({
328328
age: response.headers.get('age'),
329329
'cache-control': response.headers.get('cache-control')

0 commit comments

Comments
 (0)