Back
VueMediumNew
What is server-side rendering (SSR) in Vue, and what problem does it solve?
Rendering markup on the server for SEO/perceived performance
Ideal Answer
SSR renders a Vue application into HTML on the server before sending it to the browser, then 'hydrates' it on the client to attach interactivity. It solves two main problems with pure client-side rendering (CSR):
- SEO: Search engine crawlers see fully rendered content immediately, instead of an empty shell.
- Time-to-content: Users see meaningful content faster since the browser doesn't have to download, parse, and execute JS before displaying anything.
The official framework for building SSR (and static-site-generated) Vue apps is Nuxt, which builds on Vue's @vue/server-renderer and provides routing, data fetching, and deployment conventions out of the box.