Skip to content

When should we use SSR (Server side render) and when SSG (Static site Generation) #37

Closed Answered by patzick
patzick asked this question in Q&A
Discussion options

You must be logged in to vote

The answer is always - depends, very quick highlights though:

STATIC (SSG):

  • easy architecture, deploy to any CDN and page is working
  • quicker, the server cannot compete with serving static file
  • bundle is growing with the number of routes (and build time depends on it)
  • need to rebuild after content changes

Overall: good for small shops, where there are not many products and they don't change so often. We, for example, are using SSG for documentation sites, as once it's built the content is not changing

SSR:

  • can quickly on the runtime prepare any page view and serve it to the client
  • bundle size doesn't depend on the numbers of routes in the application
  • can adapt to dynamically changed con…

Replies: 1 comment

Comment options

patzick
Dec 30, 2022
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by patzick
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant