Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Depending on who's visiting your site and how often, the rest probably isn't in cache though. If your site is a product landing page or a small blog or something else that people are rarely going to repeatedly visit, then it's probably best to assume that all your assets will need to be downloaded most of the time.


While it'd be fun to try, I doubt you can produce any page at all that's total 14kb with assets, even back at the dawn of the web in the 90s, aside from the spartan minimal academic pages some have. And where loading faster is completely irrelevant.


The homepage for my blog is apparently 9.95kB, which includes all styles, some JS, and the content. There is an additional 22kB font file that breaks the rule, but when I first designed the site I used built-in browser fonts only, and it looked fine. There are no images on the homepage apart from a couple of inlined SVG icons in the footer.

Looking at the posts themselves, they vary in size but the content/styles/JS probably average around 14kB. You've also got the font file, but again a more minimal site could strip that. Finally, each post has a cover image that makes up the bulk of the content size. I don't think you're ever going to get that under 14kB, but they're also very easy to load asynchronously, and with a CSS-rendered blur hash placeholder, you could have an initial page load that looks fairly good where everything not in the initial 14kB can be loaded later without causing FOUCs/page layout shifts/etc.

For a magazine site or a marketing site, the 14kB thing is almost certainly impossible, but for blogs or simple marketing pages where the content is more text-based or where there are minimal above-the-fold images, 14kB is pretty viable.

For reference, my blog is https://jonathan-frere.com/, and you can see a version of it from before I added the custom fonts here: https://34db2c38.blog-8a1.pages.dev/ I think both of these versions are not "spartan minimal academic pages".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: