Default value: true
.
Implemented by: vike-react
/vike-vue
/vike-solid
.
You need
vike-react
/vike-vue
/vike-solid
to be able to use thessr
setting. If you don't usevike-react
/vike-vue
/vike-solid
then see Withoutvike-{react,vue,solid}
.
Setting to enable/disable Server-Side Rendering (SSR). You can disable SSR for all your pages or only for some pages.
What is SSR? If you're unfamiliar with SSR then check out Dan Abramov's explanation of SSR, HTML Streaming, and Progressive Rendering. (While it explains it in the context of React, we still recommend reading it if you use a UI framework other than React.)
Alternatively:
- You can use
clientOnly()
to render and load some components only on the client-side while rendering the rest of the page with SSR.- You can pre-render some of (or all) your pages.
To disable SSR for all your pages:
To disable SSR only for some pages:
For an improved file and config organization, you can consider using a domain-driven file structure.
Without vike-{react,vue,solid}
In case you don't use a UI framework Vike extension vike-react
/vike-vue
/vike-solid
, you can implement the ssr
setting yourself.
Examples:
See also Render Modes (SPA, SSR, SSG, HTML-only).