News for hackers. Stuff that matters.
Re:Hydration is pure overhead by tshaddox on Wednesday April 20, 2022 @04:35PM (#31102635)
> If that is correct then why is the javascript run on the server to begin with and not just sent directly to the browser?

Just the same ordinary reasons to generate HTML on the server: it allows you to support HTTP caching (in a CDN or even browser caching), it (potentially) lets the browser start rendering content much sooner, and it will be viewable by user agents (bots, scrapers, search engines, etc., but also humans) that don't run JavaScript.

Re:Hydration is pure overhead by chasd00 on Wednesday April 20, 2022 @04:56PM (#31102892)
that makes sense, so if you're using http caching appropriately the server side "render" or running of the javascript happens on the first visit and then infrequently thereafter.