Skip to content

Commit 98e4b8f

Browse files
authored
docs: add csr warning list (#11130)
1 parent 1926f4b commit 98e4b8f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

documentation/docs/20-core-concepts/40-page-options.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ Normally, SvelteKit renders your page on the server first and sends that HTML to
121121
```js
122122
/// file: +page.js
123123
export const ssr = false;
124+
// If both `ssr` and `csr` are `false`, nothing will be rendered!
124125
```
125126

126127
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
132133
```js
133134
/// file: +page.js
134135
export const csr = false;
136+
// If both `csr` and `ssr` are `false`, nothing will be rendered!
135137
```
136138

137-
> If both `ssr` and `csr` are `false`, nothing will be rendered!
139+
Disabling CSR does not ship any JavaScript to the client. This means:
140+
141+
* The webpage should work with HTML and CSS only.
142+
* `<script>` tags inside all Svelte components are removed.
143+
* `<form>` elements cannot be [progressively enhanced](form-actions#progressive-enhancement).
144+
* Links are handled by the browser with a full-page navigation.
138145

139146
## trailingSlash
140147

0 commit comments

Comments
 (0)