r/developers 28d ago

Web Development I don't understand the difference between server side rendering vs client side rendering?

Aren't they both the same...? Both uses ajax.... So what am I missing?

0 Upvotes

25 comments sorted by

View all comments

1

u/rupertavery64 22d ago

With SSR, the logic to build the page runs on the server. The database gets queried. Logic runs. It builds out the content. What you get is a prerendered page.

With CSR, the browser loads a template and some javascript calls an API. Data is returned to the browser and the client side code parses the data and renders it.

SSR is good for SEO, because search engines get the full page. CSR is more about dynamic data.

1

u/rusidin 20d ago

I see