News for hackers. Stuff that matters.
Re:Will serving real HTML content make a website faster? by jlembeck on Wednesday September 21, 2022 @08:46PM (#32933533)
While it does leave out server rendering time, that could not possibly account for several seconds of difference. TTFB could maybe be increased by 300-500ms… 1/10th of what gains are happening here
Re:Will serving real HTML content make a website faster? by jedberg on Wednesday September 21, 2022 @08:48PM (#32933556)
Why do you think the server can render it any faster than your computer? Server CPUs aren't all that much more powerful than desktops these days.
Re:Will serving real HTML content make a website faster? by _gabe_ on Wednesday September 21, 2022 @09:45PM (#32933930)
I'm not OP, but I don't think the argument is even about rendering. The whole point of SPA, if I understand correctly, is to send the javascript/data and then dynamically create the web page client side (with minimal updates when data changes). Javascript is fast, but a server can dynamically generate HTML in any language. Most server side languages and/or frameworks will be written in faster languages than Javascript. Additionally, you don't need to wait for the browser to deserialize the JS before it can start generating the HTML.

So the benefits of server side generation is no need to deserialize the code that generates the page and locality to the data. I'm guessing these two things are the biggest contributors to the speed ups.

I guess "server side rendering" is a bit of a misnomer, since you're not getting a rendered image, but rather a functional web page. It's possible I've misunderstood the whole SPA vs server side rendering arguments as well and my entire argument is invalid ¯\_(ツ)_/¯

Re:Will serving real HTML content make a website faster? by Scarbutt on Wednesday September 21, 2022 @10:55PM (#32934334)
Most server side languages and/or frameworks will be written in faster languages than Javascript.

Lots(most?)of server side apps are python, ruby, php or javascript.

Re:Will serving real HTML content make a website faster? by _gabe_ on Thursday September 22, 2022 @08:27AM (#32937918)
In the Stack Overflow survey it looks like the top 8 frameworks are all JS, C#,and Java. Flask, Django, Laravel and RoR start coming in after all these frameworks. So it looks like most server side apps are either JS or something faster like C# or Java.

Also this is if you check professionals. It's pretty similar for all respondents, but Flask and Django rise above spring and ASP.NET, although ASP.NET Core is still above those.

https://insights.stackoverflow.com/survey/2021#section-most-...

Re:Will serving real HTML content make a website faster? by justsomehnguy on Thursday September 22, 2022 @05:55AM (#32936763)
Some desktops? Sure.

But most of the desktops, notebooks, phones and tablets doesn't have 3GHz, 50Mb L2 processors coupled with Gb/Tbs of RAM and local (compared to the client requesting the page) storage.

Re:Will serving real HTML content make a website faster? by youngtaff on Thursday September 22, 2022 @04:22AM (#32936157)
Caching… either of the whole page or parts of it (at various layers) is one reason