From 98e4b8f059d09d57f66a8b513d809867419cc071 Mon Sep 17 00:00:00 2001 From: Hyunbin <47051820+hyunbinseo@users.noreply.github.com> Date: Sat, 2 Dec 2023 01:06:46 +0900 Subject: [PATCH] docs: add csr warning list (#11130) --- documentation/docs/20-core-concepts/40-page-options.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/documentation/docs/20-core-concepts/40-page-options.md b/documentation/docs/20-core-concepts/40-page-options.md index 90bb2cd6f28d..9df479ae6b28 100644 --- a/documentation/docs/20-core-concepts/40-page-options.md +++ b/documentation/docs/20-core-concepts/40-page-options.md @@ -121,6 +121,7 @@ Normally, SvelteKit renders your page on the server first and sends that HTML to ```js /// file: +page.js export const ssr = false; +// If both `ssr` and `csr` are `false`, nothing will be rendered! ``` If you add `export const ssr = false` to your root `+layout.js`, your entire app will only be rendered on the client — which essentially means you turn your app into an SPA. @@ -132,9 +133,15 @@ Ordinarily, SvelteKit [hydrates](glossary#hydration) your server-rendered HTML i ```js /// file: +page.js export const csr = false; +// If both `csr` and `ssr` are `false`, nothing will be rendered! ``` -> If both `ssr` and `csr` are `false`, nothing will be rendered! +Disabling CSR does not ship any JavaScript to the client. This means: + +* The webpage should work with HTML and CSS only. +* `