|
|
|
|
|
by josephg
1133 days ago
|
|
Part of it is the obsession with SPAs. If your site is an application, it makes sense to ship a javascript blob to the browser and have that render everything. But 90% of websites aren’t apps. They’re news sites. They’re blogs. They’re project pages on GitHub or npm. I think the frameworks are mostly so obsessed with the problem of complex applications that they miss having good support for the simple case of server rendering with little-to-no javascript in the browser. If your website looks like a blog, it will work better if the server ships html to the browser. And maybe, only html. Web browsers handle html really well. Because you can make content websites using hundreds of kilobytes of react, people do because that’s what they learned at their coding bootcamp. React lets you do server side rendering, but it’s seen as some advanced feature, not as the default for how we should be building the web. (In fairness, SSR is quite complex if you also want to re-hydrate in the browser). Most websites should be using tools which do server rendering by default. |
|
Meaning the server sends html, or the server sends an image?
edit: html, at least with react