Static Site Generation and Server Side Rendering
Explore the concepts of Static Site Generation and Server Side Rendering to enhance SEO in Vue applications. Learn when to use SSG or SSR based on scalability and content update needs, understand hydration, and discover popular tools such as Nuxt.js that simplify this process.
We'll cover the following...
Many websites built with Vue are Single Page Applications (SPAs). If our app is a SPA, users who visit our website would usually receive a blank HTML file with no content. The content is generated on the client-side and replaced dynamically when a user navigates between pages. In most Vue applications, browser navigation is hijacked and managed by a router library, such as Vue Router. Unfortunately, Single Page Applications are not SEO friendly. Not every crawler can handle them correctly. Therefore, to make a Vue app SEO friendly, a page sent from the server to the client shouldn’t be blank, but already filled with content. Static site generation and server-side rendering are possible solutions for that. Now, we might ask, what’s the difference between these two?