Skip to content

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

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

You must be logged in to vote

Answer from discord: https://discord.com/channels/770285988244750366/786224408460656701/837589760540147713

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

STATIC:

  • 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
  • bu…

Replies: 1 comment

Comment options

patzick
May 19, 2021
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by mkucmus
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