Static Site Generation (SSG) & Server-Side Rendering
When you're building a web application, you must come across these concepts like SSR, SSG & CSR. After the introduction of Next JS framework to the react world, these concepts start getting so much light.
Static Site Generation
This method usually will be more helpful when you want to build a static website where content of the site won't change periodically.
In this approach, the static HTML files are generated during app build time and will be served immediately when browser requested the page. As there is no pre-rendering is not involved during run time, it will be more quicker than any other approach.
This method is very fit for like blog, documentation & personal websites. Also this is very helpful when pages are served through CDN (Content Delivery Network) and provides better support for SEO.
Server-Side Rendering
With this approach, the HTML pages are rendered during run time or request time. When the user request for a particular web page, the server render the page with dynamic content and send it to the browser to display.
This approach is very helpful when you're building dynamic or personalised content webpages like e-commerce or social network. You can use this approach where content of the pages updated dynamically or frequently.
This approach helps us to build more interactive web pages and provides good support SEO as well.