Server-Side Rendering
Definition
Server-Side Rendering (SSR) is a web development technique where the HTML for a web page is generated on the server before being sent to the user's browser.
In this process, when a user requests a web page, the server assembles the necessary data and then constructs the complete HTML document. This fully rendered HTML is then transmitted to the browser. The browser receives a pre-built page, which it can display immediately. This differs from client-side rendering, where the browser downloads a minimal HTML file and then uses JavaScript to build the page content.
For instance, when you visit a news website, the server might generate the HTML for the latest articles, headlines, and images, and send that entire structure to your browser.
SSR is commonly used in frameworks like Next.js and Nuxt.js, and is often chosen for its benefits in search engine optimization (SEO) and initial page load performance.