August 16th, 2024

Why your website should be under 14kB in size

Websites should be under 14kB to optimize loading speed, influenced by the TCP slow start algorithm, especially important for high-latency connections. Minimizing unnecessary elements enhances user experience.

Read original articleLink Icon
Why your website should be under 14kB in size

Websites should aim to be under 14kB in size to optimize loading speed, as a smaller size can significantly reduce load times due to the TCP slow start algorithm. This algorithm determines how many packets a server can send at once when a browser first connects, starting with a small number of packets and increasing based on successful acknowledgments. The 14kB target is derived from the maximum size of TCP packets and the number of packets typically sent during the initial connection. Reducing website size can save visitors time, especially in high-latency situations, such as satellite internet connections, where round-trip times can be substantial. While the 14kB rule is a guideline rather than a strict limit, it encourages developers to prioritize essential content and minimize unnecessary elements like autoplay videos and tracking scripts. Even if a website exceeds this size, ensuring that the first 14kB of data sent is useful can enhance user experience. The rule remains relevant even with newer protocols like HTTP/2 and HTTP/3, which still adhere to similar principles regarding initial data transmission.

- Websites should aim for a size under 14kB for faster loading times.

- The TCP slow start algorithm influences how quickly data is transmitted.

- High latency can significantly impact load times, especially for satellite internet users.

- Minimizing unnecessary website elements can help meet the 14kB guideline.

- The 14kB rule is applicable even with modern protocols like HTTP/2 and HTTP/3.

Related

I Add 3-25 Seconds of Latency to Every Page I Visit (2020)

I Add 3-25 Seconds of Latency to Every Page I Visit (2020)

Reducing latency in web browsing can boost revenue in the consumer web industry. Intentionally adding latency to browsing activities can help curb addiction and enhance control over internet usage. Various methods like using specific browsers or tools are suggested.

Beyond bufferbloat: End-to-end congestion control cannot avoid latency spikes

Beyond bufferbloat: End-to-end congestion control cannot avoid latency spikes

End-to-end congestion control methods like TCP and QUIC face challenges in preventing latency spikes, especially in dynamic networks like Wi-Fi and 5G. Suggestions include anticipating capacity changes and prioritizing latency-sensitive traffic for a reliable low-latency internet.

The Cost of JavaScript

The Cost of JavaScript

JavaScript significantly affects website performance due to download, execution, and parsing costs. Optimizing with strategies like code-splitting, minification, and caching is crucial for faster loading and interactivity, especially on mobile devices. Various techniques enhance JavaScript delivery and page responsiveness.

Y'all are sleeping on HTTP/3

Y'all are sleeping on HTTP/3

HTTP/3, utilizing the QUIC protocol, now accounts for over 30% of web traffic, enhancing speed and reliability while addressing TCP limitations, though challenges in tooling and support persist.

Comparing HTTP/3 vs. HTTP/2 Performance (2020)

Comparing HTTP/3 vs. HTTP/2 Performance (2020)

Cloudflare has launched HTTP/3, enhancing internet performance with UDP, reducing head-of-line blocking, and offering 0-RTT support. Over 113,000 zones have activated it, showing mixed real-world performance results.

Link Icon 6 comments
By @arp242 - 3 months
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)

By @oliverkwebb - 3 months
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
By @lostmsu - 3 months
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.

By @anotherhue - 3 months
Also worry about Nagle, fast open, http2 or 3, and maybe dns resolution. Happy eyeballs too.
By @M95D - 3 months
Good luck convincing discord and wordpress about the 14KB limit.