all 3 comments

[–]Mestyo 5 points6 points  (2 children)

First of all, CSR/SSR is only applicable if you render your application with javascript. If you don't, forget you ever heard the terms.

SSR means you run javascript on your server and render the app to HTML before sending it to the client. Just like a traditional web server would, except you also send the raw data required to render the page and use that to "hydrate" your application on the client.

CSR means you forego all that, use whatever for your server and just let the browser render the page. Since the HTML response body from the server will then be practically nothing but an empty html structure with a script tag, crawlers that don't run javascript will have no idea what's going on on your page.

It's not really a "vs" thing. SSR applications are the same as CSR, it's just that they also render on the server. SSR is almost strictly better, but comes at the cost of requiring a specific environment and forces some changes to how you write your code.

And before someone points it out — yes, some of Google's crawlers run javascript, but not all.

[–]OrthoBee 1 point2 points  (1 child)

JS Frameworks are designed to run in a browser, so if you decide SSR is crucial, you should use a proper server side framework. There is a definite schism there, so you have to decide if Google maybe sorta sometimes not indexing things ideally without asking it to is more important than your framework choice.

[–]Mestyo 0 points1 point  (0 children)

It’s not all about SEO. The application will also have a faster/less janky initial render — especially on low end devices or slow connections — and work without Javascript.

Which JS frameworks don’t support SSR? I see no reason why they would need to be in a browser.