Hacker News new | past | comments | ask | show | jobs | submit login

> Isn't it also nice from a computation cost standpoint to let the client do the rendering?

Aside from all other implications, letting each client render the same stuff is a massive waste of energy and compute.




No? Each client may be receiving the same document, but based on their device, view port, preferences, etc… the rendered result may be different.

Either way, the measurement of Joules/page is likely to be such an astronomically small number compared to the constant cost of simply having a server at all IMO.


The number of devices is very small. I’m sure you get a number of different window sizes, but within a range, you can very slightly scale.


Are you suggesting we give up on rendering layouts that respond to different window sizes, display resolutions, and zoom levels? I think what you’re suggesting is that clients requesting websites should receive essentially an image of the website with limited interactivity, but that’s not going to make anyone that’s ever used a website satisfies in C.E. 2023.


You can make web pages responsive to "different window sizes, display resolutions, and zoom levels" with no JavaScript at all, so that's clearly not what they're suggesting.


That’s true, but it’s not like translating HTML into a bitmap for a display is some spontaneous process that happens for free. Your browser is anyone going to interpret all that HTML and CSS, and your users are going to click on buttons and submit forms that require changing that HTML and CSS. Whether that happens through JavaScript or SSR is bike-shedding: processing will be done, computation is needed, we can sit here and argue about how the web front end world sucks but billions of users expect interactive web applications that are very difficult to deliver without JavaScript.


Client-side json-to-html is such a microscopic part of the compute cost related to showing a change in a website that it's a rounding error. Totally inconsequential. A single widely-used inefficient css attribute or repaint costs WAY more.


If it was truly the same computation then it could be a static site generator, but with typical server side rendering you are still doing a new render per user no?


Depends but most server side frameworks cache render outputs of varying granularity. So you can cache components that are static.


I was talking about my power and computation costs, in the aggregate, I agree that it's worse.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: