Pointed out that the file size of the website should be 14 kB or less, what is the reason?



When building a website, it is a well-known fact that the smaller the file size, the faster the loading. Website developer Nathaniel argued that the file size should be 14 kB or less, and explained why he chose 14 kB instead of 15 kB or 16 kB.

Why your website should be under 14kB in size |

https://endtimes.dev/why-your-website-should-be-under-14kb-in-size/

A 14kB page loads 612 milliseconds faster than a 15kB page, Nathaniel said, but the difference between a 15kB page and a 16kB page isn't much. This seems to be due to TCP's slow start algorithm, which communicates packets of data with high reliability.

When a browser connects to a server and starts sending data, the server has no idea how much data to send per second. To avoid sending too much data over a potentially congested network, the server sends a safe amount of data first. Usually 10 TCP packets are sent.

When this packet reaches the site visitor, the visitor's PC sends an acknowledgment (ACK) that the packet was received. After receiving this, the server will send back more data, but this time the amount of packets will be doubled. This process repeats and data continues to be sent and received until the packets approach the window size presented by the visitor and the server no longer receives an ACK. In this way, instead of sending all data from the beginning, TCP slow start is a method that gradually increases the amount of data transferred.



The number '14kB' claimed by Mr. Nathaniel comes from the size of the TCP packet. The maximum size of one TCP packet is 1500 bytes, of which 40 bytes are used as the packet header. The rest is 1460 bytes, slow start sends 10 packets first, so 1460 x 10 = 14,600 bytes, 14kB.

In other words, if you can fit your entire website, or just the essential resources of your website, in 14kB, you can minimize the communication that occurs between your site's visitors and your site's servers.

However, some servers have increased the number of slow-start packets to 30, while others use

TLS handshakes to provide larger window sizes and initiate communications with more packets. Nathaniel points out that 14 kB cannot be said to be correct because there is also.



“Once you get rid of autoplay videos, popups, cookies, consent banners, social network buttons, tracking scripts, JavaScript and css frameworks, and other garbage that no one likes, you can probably shrink it,” Nathaniel said. You love them and you want them to be happy, and your website should be as small as possible.'

in Web Service, Posted by log1p_kr