Why would you use server-side rendering (SSR) for a login protected web app?

by

I have come along a lot of examples where web apps require login and use server-side rendering.

 

I get that it’s better for SEO, but how would that apply if the app is login protected (different story for a marketing website)?

I get that it can contribute to faster initial load, but if you must log in first you have visited before. The Javascript modules should already be in the browser cache. Having to transfer some small Json bytes would make a true SPA load faster than transferring a fully rendered page from the origin server that cannot be cached on edge or in the browser.

 

On the other hand, it requires more computing power, increases and adds complexity (e.g. hydration) and sometimes opens vulnerabilities that wouldn’t be there otherwise. I sure get that cloud services push for that – they make good money with every request and conceal it with a free tier.

Since a large part of products launched on Product Hunt are web apps – I wonder what makes you choose server-side rendering or why not? What benefits do you see? Or did you just follow default template configurations, and it was a decision based solely on developer convenience?

If you do use server-side rendering: Is your backend also written in javascript/typescript? Would you have decided differently if your backend was written in another language (Go, Rust, C#, Java, etc.)?

42 views

Add a comment

Replies

Be the first to comment