4 ms·
I've been a front-end engineer for over a decade and I still struggle to understand the value of SSR as a feature of front-end frameworks. - Websites that care
by Kerrick 3y ago
I've been a front-end engineer for over a decade and I still struggle to understand the value of SSR as a feature of front-end frameworks.
- Websites that care about SEO rarely need front-end frameworks.
- Web apps that need front-end frameworks tend to be behind a login screen or used for creating documents rather than publishing them.
- SSR strategies sometimes render loading states through `</html>` and then tack on additional JavaScript streamed at the end for fully-loaded state, removing any NoScript benefit you might hope to get.
- meiraleal 3y agoSSR is useless and a waste of money. But VC money is gone and the tools maintainers need the users to waste money on their cloud so that is the direction they are pushing. Lit is so simple that it can't become a VC-backed project (I hope).
- pier25 3y agoI disagree. Eg: there are plenty of SEO apps that need interactivity like ecommerce, docs, etc.
- pier25 3y agoAnd SSR is really the basis for partial hydration or whatever mechanism you choose to reduce JS to the absolute minimum necessary on the client.
- mdhb 3y agoAlso that entire idea that you need SSR for good SEO is advice that is about a decade out of date. That hasn’t been true for a long long time.
- pier25 3y agoGoogle can index JS content but CWV are important for SEO. https://developers.google.com/search/docs/appearance/core-web-vitals https://developers.google.com/search/docs/appearance/core-we... The simple truth is server rendered or static HTML will always result in better CWV than CSR with an API.
- mdhb 3y agoI just wanted to point out here because the distinction is kind of important. There are still a lot of things that are popular in the CSR space that are just based on some very weird architectural choices that do typically lead to worse CWV metrics, worse accessibility etc. Looking at you NextJS and larger React community in general. However hitting those CWV metrics using a CSR solution, especially one that is just straight up standard web platform stuff such as Lit is not going to be a problem at all and you aren’t somehow improving your SEO simply because you rendered it on the server. I think there is a misconception here that the CWV metrics are processed in a numerical fashion like 0.2s for LCP is better than 0.3s but there is literally not a single shred of evidence for that nor does it even make sense. Those metrics are bucketed into 3 categories of good, needs improvement and poor intentionally.