Do you know what Server Side Rendering (SSR) is?

ยท

1 min read

1 When your browser makes a request to a website, the server returns a JS bundle with HTML templates, CSS stylesheets, JavaScript files, and other static assets (such as images and fonts..)

2 The JavaScript files received, are used to manipulate the DOM tree, ie- to make the content dynamic in the HTML web pages. This is by default done on the client side, by the browser. Also called Client Side Rendering (CSR)

3 But, when the same set of JavaScript files are used to render HTML web pages, but on the server side, it is known as Server Side Rendering (SSR). The fully rendered HTML pages are sent to the browser in this case.

Advantages of SSR:
๐Ÿ“Œ Faster load times
๐Ÿ“Œ SEO Optimized since search engines can easily crawl and index the fully rendered HTML content

It is most suitable for static applications like news websites, but SSR alone might not be sufficient for real-time applications.

ย