Pergunta de entrevista da empresa Appitsimple

What is Server Side Rendering and Client Side Rendering?

Resposta da entrevista

Sigiloso

17 de fev. de 2024

Server-Side Rendering (SSR): With SSR, the server generates the full HTML and JS code needed to display the initial view of the web page. All necessary data is gathered, processed, and generated on the server before sending the full HTML response to the client. Benefits are faster initial load speeds and optimization for SEO as crawlers see fully rendered pages. Client-Side Rendering (CSR): With CSR, the server simply sends minimal HTML, JS and CSS code required for the initial load. The client then runs the JS code and renders/populates the DOM dynamically after page load. Benefits are interactivity feels fast as subsequent views are rendered locally by JS. Downsides are longer initial load as JS must run before view is rendered. Poorer for SEO as crawlers don't see rendered content.