Middle
What types of page rendering are there?
sobes.tech AI
Answer from AI
- Async Rendering: Parts of the page (e.g., data fetched via AJAX requests) load and display gradually, without blocking the loading of the main structure.
- Client-Side Rendering (CSR): The browser loads a minimal HTML file that contains a link to a JavaScript bundle. This bundle executes in the browser and dynamically builds the DOM.
- Server-Side Rendering (SSR): The server generates a complete HTML document with content for each visited page and sends it to the browser. The browser displays the page already rendered.
- Static Rendering (Static Site Generation, SSG): Pages are generated as static HTML files during the build process. These files are then served to the user, ensuring very fast loading.
- Isomorphic (Universal) Rendering: JavaScript code that can run both on the server and on the client. This allows the page to be initially rendered on the server (to speed up the first display and SEO), and then handed over to the client for interactivity.
| Rendering Type | Where it happens | Initial load | SEO | Interactivity |
|---|---|---|---|---|
| CSR | Client (browser) | Slower than first content | Can be more complex | High after JS load |
| SSR | Server | Faster than first content | Good | Appears after JS load |
| SSG | During project build | Very fast | Excellent | Depends on JS added after static load |
| Isomorphic | Server and client | Fast initial display | Good | High after "hydration" |