What is Server-Side Rendering (SSR) in Nuxt.js?

Answer

Server-Side Rendering (SSR) means that the HTML for a page is generated on the server for each request and sent to the browser already populated with content. In Nuxt.js, SSR is enabled by default. When a user visits a URL, Nuxt's Nitro server executes Vue component code, fetches data, renders the component tree to HTML, and sends it to the browser. The browser then hydrates this HTML with JavaScript to make it interactive. SSR improves initial page load performance and is critical for SEO because search engine crawlers receive fully rendered HTML.