Live data from Hacker News

A 14kb page can load much faster than a 15kb page

endtimes.dev

321–330 of 356 posts

Re: A 14kb page can load much faster than a 15kb page

#321

Love how this person's blog itself consist of single HTTP requests per page load. No extra css, images, scripts, or anything! This blogger cares about web perf!

Any recommendations for running a blog efficiently with posts that include images? I've cut my website down to some very basic styling, but since it's a personal blog, my picture is on the front page. That picture takes up more space than I'd like, but I feel like it's important for readers to see me on the front page. Maybe I should just remove it? But I still have a lot of blog posts that include multiple images, a…

IMO if you want a personal pic on your blog it could make sense to move it to your About page.

For actual blog posts/other content that contains pictures, it makes sense that those take up more space than 14kb - probably nothing to worry about there.

If you can, it might be good to try ensure you load the images after other aspects (CSS, HTML text content) are loaded, per the blog post. But all in all it likely isn't a big issue.

Re: A 14kb page can load much faster than a 15kb page

#322
post #243

Earlier quoted context omitted.

Folks, b is bits, B is bytes. For someone who deals with IT/telecomm the careless use of bits, bytes, B, b, kB/s, kb/s, kbps, MiB/s, Gbit is a source of confusion, because all those abbreviations have a very specific and distinct meaning. And whenever someone writes something not very obvious (eg Gbit for line speed, or kb for a size of a file or network transfer chunk), I need to figure out if they don't understand…

> Folks, tomato is a fruit, celery is a vegetable. As someone who deals with botany, the careless use of... > And whenever someone writes something not very obvious (eg Fruit salad for apples oranges and grapes... One day, people will learn that their specialised understanding of terms, when not synchronised with an entire world of users, need to be viewed in the lens of the audience in which it sits. In the layperso…

No post body was provided.

Re: A 14kb page can load much faster than a 15kb page

#323
post #305

Earlier quoted context omitted.

You are missing the steps to install, setup, cronjob, for certbot. What about HTTP->HTTPS redirection, etc? Same for secure cipher selection. All of that Caddy gives you in 1 line of config (i.e. domain name)

Funny you mention those because the line above automatically adds all those for you including https redir for all your vhosts.

The biggest thing you miss is that nginx doesn't do all this for you, you have to install a 3rd party thing to manage it.

If we allow your example, then caddy wins hands down because it also makes me rich because it fronts the websites that make me money.

But that would be ridiculous thing to claim Caddy does, because it doesn't do that itself.

Re: A 14kb page can load much faster than a 15kb page

#324
post #277

Earlier quoted context omitted.

Easier in what sense? If you find the most esoteric feature and then claim it's easier for that purpose, that doesn't count! If you're going to claim it's easier to configure than nginx you have to make a fair comparison by comparing not the features that you care about, but instead the features that define the system as a whole.

Setting up TLS and reverse proxy to several upstreams. This isn't an uncommon use case. nginx: https://github.com/shepherdjerred/servers/tree/8688ba2086d87... caddy: https://github.com/shepherdjerred/servers/tree/main/zeus/con... I have a feeling you're think we're attacking nginx. I can't speak for the other poster, but I have huge respect for nginx. It's a great piece of software and it's what I'd reach for in prod…

Neat comparison!

(And Caddy is an excellent choice for production. Or so says the many companies now powering half a million sites with it!)

Re: A 14kb page can load much faster than a 15kb page

#325
post #243

Earlier quoted context omitted.

Folks, b is bits, B is bytes. For someone who deals with IT/telecomm the careless use of bits, bytes, B, b, kB/s, kb/s, kbps, MiB/s, Gbit is a source of confusion, because all those abbreviations have a very specific and distinct meaning. And whenever someone writes something not very obvious (eg Gbit for line speed, or kb for a size of a file or network transfer chunk), I need to figure out if they don't understand…

> Folks, tomato is a fruit, celery is a vegetable. As someone who deals with botany, the careless use of... > And whenever someone writes something not very obvious (eg Fruit salad for apples oranges and grapes... One day, people will learn that their specialised understanding of terms, when not synchronised with an entire world of users, need to be viewed in the lens of the audience in which it sits. In the layperso…

> that articles by the layperson are likely to be referring to bytes

Guidelines: "Anything that good hackers would find interesting.".

Also, it's not a problem with the original article, it uses units correctly - it's a problem with the title, and with some comments.

Re: A 14kb page can load much faster than a 15kb page

#326
post #213
post #109

Earlier quoted context omitted.

Thanks for the tip! For others wondering how you can do this, go to Settings -> Fonts -> Advanced, and uncheck "Allow pages to choose their own fonts...".

Or use uBlock Origin, which will allow you to re-enable fonts if disabling them breaks a site.

[deleted]

Re: A 14kb page can load much faster than a 15kb page

#327
post #213
post #109

Earlier quoted context omitted.

Thanks for the tip! For others wondering how you can do this, go to Settings -> Fonts -> Advanced, and uncheck "Allow pages to choose their own fonts...".

Or use uBlock Origin, which will allow you to re-enable fonts if disabling them breaks a site.

I wish you could do this with Brave (without uBlock Origin).

Re: A 14kb page can load much faster than a 15kb page

#328

That's only doable with a text-centric website. I'm currently finishing a photography section for my personal website, and the gallery pages are several hundred kBs in size, while single photo page is almost 1MB in size (provided you load it on a 28" screen; browser will load smaller variants on smaller screens). Most of that weight is the thumbnails (and almost-full-size photo in the latter case). The only JS I have…

Tell me you didn't read the article without telling me you didn't read it.

The point is to have your initial page load under 14kB to get the most utility out of the initial TCP window size. It doesn't say you need to have an entire site fit into 14kB.

With GZip compression you could easily get a 50-60kB HTML document under 14kB. In 50kB you can easily have OpenGraph metadata, links to alternate representations (RSS etc), link/script tags for external styles and scripts, some base level inline CSS, and some actual useful content. In your initial 14kB sent over the line you can tell the consumer everything they'll need to load the rest of the page's content.

If the content is a blog post or news article it would not take too much effort to fit all of the text content into 50-60kB and progressively enhance it with CSS and JavaScript with minimal content repaints. A few lines CSS in a style tag will give you perfectly readable text content and allow for images and such to load without repaints.

Even an image gallery can have a useful 14kB initial load with img tags containing a height and width and single line of CSS to give them some default background color or pattern before an image loads. Even if you want to do a bunch of stupid effects that can all be done with JavaScript loaded after the initial small TCP window loading.

The idea is to give a browser something useful in the brand new connection so it can start loading and rendering. If the first few packets contain a usable scaffold of a larger more involved page, even users with shitty connections can have something besides a blank page to look at. Done right they could have an actual useful page even if none of the extra content loads.

Re: A 14kb page can load much faster than a 15kb page

#329
Nice article! However some numbers are a bit off:

The IPv4 overhead is normally 20 bytes but can reach 60 bytes with many options. For TCP, it's between 20 and 60 bytes as well.

Just ran a quick tcpdump on Linux and curl's TCP connection uses 32 bytes TCP headers (12 bytes of options).

Re: A 14kb page can load much faster than a 15kb page

#330
post #11

Does this mean your website should also only use HTTP for maximum speed.

I guess so. The OP replied and said yes, but he's banned for being an anti-semite and a COVID minimizer, so I'll say it again for those who have dead comments hidden. It's a shame that you can't have both speed and security. One possibility is to have a subdomain, insecure.blah.com, that doesn't redirect to HTTPS by default.

No post body was provided.
Post reply on HN