What is SSG, SPA, SSR?

2 min read

From everything I’ve read while planning my survey app, here’s a quick breakdown of these rendering methods:

SSG (Static Site Generation)

SSG generates the website’s pages during the build process. The result is plain HTML files served directly to the user. It’s fast and efficient but doesn’t work well for apps that need frequent updates or dynamic content.

SPA (Single Page Application)

SPAs deliver a minimal HTML file initially, and everything else is handled on the client side with JavaScript. This makes the app feel interactive, but it depends heavily on the user’s device to load and process the content. It’s not the best for SEO unless additional steps are taken.

SSR (Server Side Rendering)

SSR processes the page on the server before sending it to the user. The content appears faster compared to SPA, and search engines can read the content easily. However, the process takes longer as the server has to handle the rendering before the user gets the page.

SPAs work best for interactive apps, SSR strikes a balance between SEO and interactivity, and SSG is best for static sites. Choosing one depends entirely on the app’s needs.

And, I’ll be using SSR for my Astro DuckSurvey app. [Yeah, that’s the name I’m thinking of!] I already played around with some random repo I found on GitHub, so I have a bit of experience with it now.