Hacker News new | past | comments | ask | show | jobs | submit login
Why your website should be under 14kB in size (endtimes.dev)
19 points by franze 8 months ago | hide | past | favorite | 7 comments



Previous (same story, posted under different title):

A 14kb page can load much faster than a 15kb page - https://news.ycombinator.com/item?id=32587740 - Aug 2022 (349 comments)


A issue with this is favicons. Which take up loads of space since they are tiny (usually losslessly compressed raster) images. You can simplify them or make them smaller or in ycombinaters case turn them into SVG. But without _changing_ the image itself it's still around a dozen kilobytes in some cases


This would have been very doable with interactivity if we used bytecode instead of JavaScript. WinForms apps start at 5KB (dependent on .NET Framework).

Might become doable with WASM if standard library and DOM won't be dynamic dispatch only.


How much JS do you actually need? 15k is a lot of code for a static page.

HN is an app/forum and only has 5k of js.


HN is a pretty simple app. My cloud gaming project https://borg.games has 700kb of JS without minification or compression, half of which is Microsoft's authentication library (they could have probably cut the cruft out to reduce the size 3x).

I'm sure though that if instead of JavaScript it was compiled to bytecode, it would fit in under 100kb before compression.


Also worry about Nagle, fast open, http2 or 3, and maybe dns resolution. Happy eyeballs too.


Good luck convincing discord and wordpress about the 14KB limit.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

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

Search: