Vue.js / Nuxt.js

Nuxt SSR & SSG

Server-side rendering, static generation, hybrid rendering, prerendering, route rules, nitro

22 คำถามสัมภาษณ์·
Mid-Level
1

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

คำตอบ

SSR generates the complete HTML on the server with each request, then sends it to the client. This improves SEO as search engines receive immediately accessible HTML content, and also improves time to first paint. SSR is the default rendering mode in Nuxt 3, unlike client-side rendering where JavaScript generates content in the browser.

2

What is Static Site Generation (SSG) in Nuxt?

คำตอบ

SSG generates all pages as static HTML at build time, allowing pre-generated files to be served very quickly. This approach is ideal for sites with content that doesn't change often, like blogs or documentation. In Nuxt 3, using nuxt generate activates SSG, creating HTML files for each configured route.

3

Which Nuxt command should be used to generate a static site?

คำตอบ

The nuxt generate command (or npm run generate if configured in package.json) triggers static generation of all pages. Nuxt traverses routes and creates an HTML file for each, which is placed in the .output/public folder. This command is used to deploy on static hosts like Netlify, Vercel or GitHub Pages.

4

What is the main advantage of SSR for SEO?

5

What is hybrid rendering in Nuxt?

+19 คำถามสัมภาษณ์

เชี่ยวชาญ Vue.js / Nuxt.js สำหรับการสัมภาษณ์ครั้งถัดไป

เข้าถึงคำถามทั้งหมด flashcards แบบทดสอบเทคนิค แบบฝึกหัด code review และตัวจำลองสัมภาษณ์

เริ่มใช้ฟรี