From 3f76c1a661c9069c13585094d025e8d018f3e6f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Orb=C3=A1n?= Date: Wed, 16 Mar 2022 11:48:20 +0100 Subject: [PATCH] Update going-to-production.md --- docs/going-to-production.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/going-to-production.md b/docs/going-to-production.md index 96b49ade28af..c0527b966a54 100644 --- a/docs/going-to-production.md +++ b/docs/going-to-production.md @@ -68,6 +68,7 @@ export async function getServerSideProps({ req, res }) { } } ``` + By default, `Cache-Control` headers will be set differently depending on how your page fetches data. If the page is using `getServerSideProps` or `getInitialProps`, then it will use the default `Cache-Control` header configured by `next start` in order to prevent accidental caching of responses that cannot be cached. If you want a different cache behavior while using SSR you can use `res.setHeader('Cache-Control', 'value_you_prefer')`.