Live data from Hacker News

Will serving real HTML content make a website faster?

blog.webpagetest.org

71–80 of 109 posts

Re: Will serving real HTML content make a website faster?

#71
post #21

I'd been thinking that 5G is a thing only because the IOT is a thing. It had nothing to do with phones, but the build-out is funded by phones. So when it all settles down, phones will be as slow as they were in the 3G era, at best, what with so much stuff clamoring for data. Plain Jane HTML is going to save us.

I've seen this with my telco provider with 5G, full bars and it is still almost unusable. replace people with IOT devices pinging and sending tiny messages constantly it's gonna be rough :)

Re: Will serving real HTML content make a website faster?

#72
post #67
post #57

Earlier quoted context omitted.

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.

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 Javascrip…

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?

#73
post #14

Earlier quoted context omitted.

As usual, it depends. I just tested my own site, which I built using Gatsby — a JS framework — and https://astro.build , whose entire schtick is that they deliver as little JS to the page as possible. (Because I’m thinking of rebuilding my site using Astro. But that’s not relevant here.) In the default test, my page loaded in 1.6s and Astro in 1.9s. In the ‘not bad’ ratings below the main figures, my site fared bette…

I bet it could be rewritten to feel instantaneous as well. it's a common misconception that SSR implies no XHR at all. That's never been true except prior to IE5 adding the technique for outlook.

SSR doesn't mean no XHR, it usually just means that change in route means round trip to the server. If you're doing SSR only for the initial page load then it's typically called hydration.

Re: Will serving real HTML content make a website faster?

#74

Time for a hot take: You don't need to make your website fast, all you have to do is not make it slow in the first place. Partially or fully generating a web site client side can be plenty fast, the slowness tends to come from using some bloated framework to do so.

> You don't need to make your website fast, all you have to do is not make it slow in the first place. This requires testing. Which is, apparently, something most companies don't know how to do correctly.

Automated performance regression testing in browsers isn't trivial. Hell automated correctness testing in browsers isn't trivial. It's just not a well-trodden path -- automating browsers to test anything at all is messy and brittle.

Re: Will serving real HTML content make a website faster?

#75
post #14

Earlier quoted context omitted.

As usual, it depends. I just tested my own site, which I built using Gatsby — a JS framework — and https://astro.build , whose entire schtick is that they deliver as little JS to the page as possible. (Because I’m thinking of rebuilding my site using Astro. But that’s not relevant here.) In the default test, my page loaded in 1.6s and Astro in 1.9s. In the ‘not bad’ ratings below the main figures, my site fared bette…

I'm pretty new to Astro, but I did see this official plugin https://docs.astro.build/en/guides/integrations-guide/prefet... which I believe does what you're looking for.

Woah! I was gonna play with Astro for a new site test, but I wanted the prefetch fast-nav that I’ve seen in NextJS and Gatsby. This looks like exactly what I want to make Astro so the trick! Thanks for sharing

Re: Will serving real HTML content make a website faster?

#76

There could be a companion article: "Will Consuming Only Real HTML Content Make A Website Faster? Let's Experiment!" Having myself run this "experiment" for many years now by (a) controlling DNS so that only the domain in the "address bar" URL is resolved^1 and (b) making HTTP requests using a TCP client and/or an unpopular nongraphical web browser that only processes HTML and does not perform auto-loading of resourc…

What browser do you use?

Re: Will serving real HTML content make a website faster?

#77

It will certainly make the website more accessible to more people and reduce the load on their computers. This is required for government/public services. Look at how nice the UK NHS sites are. But for-profit corporations are free to, and seem to always, go the javascript application route because it is cheaper and easier to find teams to build them.

I'm sad we are downgrading quality of workforce just to increase the size of the pool. Try not to have gate keeper mindset but the new army of js warriors coming in industry makes the ecosystem off of engineering basis.

Re: Will serving real HTML content make a website faster?

#78

Time for a hot take: You don't need to make your website fast, all you have to do is not make it slow in the first place. Partially or fully generating a web site client side can be plenty fast, the slowness tends to come from using some bloated framework to do so.

The `***-dom.js` is 130.5 kB minified. Imagine parse and evaluate time browser takes before doing anything else. .. Oh also that's 0 LoC app, just a lib.

Re: Will serving real HTML content make a website faster?

#79

Earlier quoted context omitted.

In my experience, it's not even the framework that's the problem. Client-side rendered React is plenty fast for example. Not as fast as server-rendered (or even better, static) HTML, but fast enough (measured in a few hundreds of ms) that you won't notice the difference. It's generally things like loading lots of 3rd party scripts, or not paying to how many network roundtrips are required on the critical loading path…

> a few hundreds of ms Gotta be honest, I’m grimacing already. An order of magnitude too much.

For me, generally sub 100ms is acceptable. a few hundreds .. No thanks html over the socket is faster than that.

Re: Will serving real HTML content make a website faster?

#80

Earlier quoted context omitted.

Newer frameworks like Svelte or SolidJS are a lot less bloated on the client. Though we're still far from successfully minimizing the amount of network roundtrips involved in a SPA update, so there's plenty of room for improvement still.

I like what Ruby on Rails 7 has done with Hotwire and Stimulus. All html is rendered server side. If you need client side interactions, you can mount lightweight components using plain JavaScript.

How about spreadsheet and google map app!? \s \s \s!
Post reply on HN