3 ms·
> Executing some client-side JavaScript to get the DOM setup for first-paint is fine, as long as the payload delivery + render time is fast, and it can be reall
by Touche 11y ago
> Executing some client-side JavaScript to get the DOM setup for first-paint is fine, as long as the payload delivery + render time is fast, and it can be really fast, especially when you create custom elements optimized for first paint.
But those things are not that fast. You can inline the scripts but then you're just making your page heavier (and not taking advantage of caching).
Anything is possible with enough effort but I want to use a technology that makes good results easy. Server-side rendering gives you that, if you can run the exact same code in both contexts you don't have to worry about the types of optimizations you're referring to.