Why your website should be under 14kB in size
https://endtimes.dev/why-your-website-should-be-under-14kb-in-size/
- if you can fit your website — or the critical parts of it — into 14kB, you can save visitors a lot of time — the time it takes for one round trip between them and your website’s server
- TCP slow start is an algorithm used by servers to find out how many packets it can send at a time.. When a browser first makes a connection to your server — the server has no way of knowing the amount of bandwidth between them.
- Most web servers TCP slow start algorithm starts by sending 10 TCP packets.. The maximum size of a TCP packet is 1500 bytes.. This maximum is not set by the TCP specification, it comes from the ethernet standard. Each TCP packet uses 40 bytes in its header — 16 bytes for IP and an additional 24 bytes for TCP. That leaves 1460 bytes per TCP packet. 10 x 1460 = 14600 bytes or roughly 14kB!
- Your server doesn’t know how much data the connection can handle — so it starts by sending you a small and safe amount of data — usually 10 TCP packets.. If those packets successfully reach your site’s visitor, their computer sends back an acknowledgement (ACK) saying the packets have been received.. Your server then sends more data back, but this time it doubles the amount of packets.. This process is repeated until packets are lost and your server doesn’t receive an ACK. (At which point the server continues to send packets but at a slower rate