How server-side rendering work?
Server-side rendering is the predominant method used to present information on a display. It involves the server transforming HTML documents into data that the browser can interpret.
Every time you access a website, your browser sends a request to the server hosting the website’s content. The duration of this request is brief, typically a few milliseconds, but it can vary based on several factors:
- Your internet connection speed
- The geographical location of the server
- The number of people accessing the site simultaneously
- The level of optimization of the website, among others
After processing the request, the browser receives the fully rendered HTML and displays it on your screen. Should you navigate to a different page within the same website, your browser will submit a new request for the specific content. This process repeats for every new page you visit that isn’t already stored in the browser’s cache.
Regardless of whether the new page has only minor differences from the current one, the browser will request the entire page and render it anew.
Is Server Side Rendering(SSR) always good ?
SSR is a technique used in web development where the HTML of a webpage is generated on the server rather than in the browser. This means when a user requests a webpage, the server prepares the HTML document by executing the necessary logic and sends it to the client’s browser, fully formed and ready to be rendered. This approach is different from CSR, where JavaScript runs in the browser to generate HTML content dynamically.
Table of Content
- How server-side rendering work?
- Benefits of SSR
- Drawbacks of SSR
- When to Use and When Not to Use SSR
- Hybrid Approach