TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A 14kb page can load much faster than a 15kb page

933 pointsby DitheringIdiotover 2 years ago

76 comments

hotenover 2 years ago
Another optimization in the same vein: make sure the first KB contains the &lt;meta charset&gt; element, to avoid false-starts in the HTML parser. In fact, it&#x27;s actually specified as an _error_ in the spec to have it come after 1KB!<p>It&#x27;s mentioned in passing on the Lighthouse docs for the charset audit[1], but here&#x27;s a great breakdown by hsivonen[2].<p>Of course, in the headers is even better. Point is, try not to have too much cruft before the charset.<p>[1] <a href="https:&#x2F;&#x2F;web.dev&#x2F;charset&#x2F;" rel="nofollow">https:&#x2F;&#x2F;web.dev&#x2F;charset&#x2F;</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;GoogleChrome&#x2F;lighthouse&#x2F;issues&#x2F;10023#issuecomment-575129051" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;GoogleChrome&#x2F;lighthouse&#x2F;issues&#x2F;10023#issu...</a>
评论 #32591772 未加载
GrumpySlothover 2 years ago
That&#x27;s only doable with a text-centric website. I&#x27;m currently finishing a photography section for my personal website, and the gallery pages are several hundred kBs in size, while single photo page is almost 1MB in size (provided you load it on a 28&quot; screen; browser will load smaller variants on smaller screens). Most of that weight is the thumbnails (and almost-full-size photo in the latter case). The only JS I have is 6 lines (before minifying) on single photo pages which allow you to go to next or previous photo with keyboard arrows. I don&#x27;t use any CSS frameworks, just a single hand-written CSS file. I don&#x27;t have any tracking, analytics, social media features or anything of this sort.<p>So if even a personal site being done with no deadlines, no pressure from management to include analytics etc. can&#x27;t do it, because it wants to display a bunch of photos, then I don&#x27;t think we can expect &quot;web-scale&quot; websites to achieve it.
评论 #32589107 未加载
评论 #32588969 未加载
评论 #32589795 未加载
评论 #32589054 未加载
评论 #32590683 未加载
评论 #32599679 未加载
评论 #32589039 未加载
评论 #32590571 未加载
评论 #32597083 未加载
评论 #32592339 未加载
评论 #32589436 未加载
onion2kover 2 years ago
I wonder if anyone has studied the impact of latency on user behavior while considering the impact of user expectations from their typical connection speed. Whenever I see an article about page speed optimization, the assumption is that a user will give up if a page takes too long to load, ans that everyone gives up after X seconds. Usually X is about 7s based on a Nielson article from years and years ago.<p>The thing is tbough, a user who frequently uses satellite Internet or a 2G mobile connection will learn that pages take a while to download over that connection, and they will adjust their expectations accordingly. Satellite Internet users <i>aren&#x27;t</i> giving up on pages every 7s. They&#x27;re waiting because they know the page will load slowly.<p>I suspect most users wait for a page if most pages are slow. So long as your website is no slower than the average then you&#x27;re probably not losing many visitors.<p>Obviously that&#x27;s not to say you shouldn&#x27;t make your website as fast as you can. You should. Everyone will appreciate the effort. But don&#x27;t assume that knocking a few seconds off the TTI time will actually impact your conversion metrics. It <i>probably</i> won&#x27;t (but only a proper study can prove it either way).
评论 #32590192 未加载
评论 #32591651 未加载
评论 #32590181 未加载
评论 #32591843 未加载
评论 #32591408 未加载
strkenover 2 years ago
The relevant QUIC draft recommends a similar window[0], so HTTP&#x2F;3 looks like it will behave the same.<p>[0] <a href="https:&#x2F;&#x2F;datatracker.ietf.org&#x2F;doc&#x2F;id&#x2F;draft-ietf-quic-recovery-26.html#section-b.1-2.2" rel="nofollow">https:&#x2F;&#x2F;datatracker.ietf.org&#x2F;doc&#x2F;id&#x2F;draft-ietf-quic-recovery...</a>
评论 #32591774 未加载
allanrboover 2 years ago
Love how this person&#x27;s blog itself consist of single HTTP requests per page load. No extra css, images, scripts, or anything! This blogger cares about web perf!
评论 #32591086 未加载
评论 #32591560 未加载
评论 #32596808 未加载
Yhippaover 2 years ago
I&#x27;m getting 62 bytes over the network and 31.4 kilobytes uncompressed. This page has more content than most pages I visit that are megabytes in size. I wish there was an incentive to go back to smaller web pages in general.
评论 #32588770 未加载
评论 #32591976 未加载
评论 #32589085 未加载
levpopovover 2 years ago
This is mostly nonsense, you can easily check for yourself.<p>Load up the OP&#x27;s page with Chrome dev tools network tab open.<p>Connection start: 90ms (60ms of which is SSL handshake) Request&#x2F;Response: 30ms request &#x2F; 30ms response<p>So the whole post is about yak shaving not splitting the 30ms response portion of a request that already takes 5x that (150+ms).<p>Sure it&#x27;s a bit faster, but your users will not notice the difference between a 14kb page and a 15kb page over https (which you hopefully have on).
est31over 2 years ago
&gt; Most web servers TCP slow start algorithm starts by sending 10 TCP packets.<p>Of course big names that run CDNs have fancy custom stuff that directly puts data into mmaped regions for the network card to use, but generally, it&#x27;s the OS handling TCP connections, and this means that the web server, a user space process, only interacts with the TCP connection through a streaming API. It can&#x27;t issue individual TCP packets or ACK packets or anything. Raw socket access requires superuser privileges in unix.<p>Outside of that it&#x27;s a great article. Didn&#x27;t know about this particular trick :).
评论 #32588611 未加载
评论 #32588617 未加载
Ayeshover 2 years ago
A typical HTTPS RSA certificate is about 3.9kb. ECDSA certificates with ECDSA cross-signed with an RSA root will be around 2.9kb. So this 14kb of HTML response should leave some room for the certificates too.
评论 #32590662 未加载
评论 #32590673 未加载
chinabotover 2 years ago
Wow a web page that appeared the second I pressed the link, I guess he practices what he preaches.
评论 #32588917 未加载
评论 #32592257 未加载
评论 #32589207 未加载
csnoverover 2 years ago
&gt; There is an idea that the 14kb rule no longer holds true when using HTTP&#x2F;2. I&#x27;ve read all I can about this without boring myself to death — but I haven&#x27;t seen any evidence that servers using HTTP&#x2F;2 have stopped using TCP slow start beginning with 10 packets.<p>HTTP&#x2F;3 formally replaces TCP with QUIC.[0] Google have been using QUIC in production for quite a while (since 2013!) and it’s enabled by default in every browser except Safari[1] so it’s understandable how there could be some confusion here.<p>[0] <a href="https:&#x2F;&#x2F;datatracker.ietf.org&#x2F;doc&#x2F;html&#x2F;rfc9114" rel="nofollow">https:&#x2F;&#x2F;datatracker.ietf.org&#x2F;doc&#x2F;html&#x2F;rfc9114</a><p>[1] <a href="https:&#x2F;&#x2F;caniuse.com&#x2F;http3" rel="nofollow">https:&#x2F;&#x2F;caniuse.com&#x2F;http3</a>
评论 #32588904 未加载
zinodaurover 2 years ago
I like the idea mentioned in the article of increasing the number of packets sent in the slow start - as far as I know you could just crank that from the server side TCP stack to something much larger, right?
评论 #32590874 未加载
评论 #32590433 未加载
评论 #32593211 未加载
评论 #32591137 未加载
CodeIsTheEndover 2 years ago
Shameless self-promotion: the homepage of plaintextsports.com is 5.2kb today [1], an in-progress WNBA game (4th quarter) is 11.2kb [2], and an extra inning MLB game is 8.8kb [3]. I wasn&#x27;t aware of this size threshold, and I&#x27;m not at this level of optimization, but I&#x27;m always pleased to find more evidence of my playful claim that it&#x27;s the &quot;fastest website in the history of the internet&quot;.<p>[1]: <a href="https:&#x2F;&#x2F;plaintextsports.com&#x2F;all&#x2F;2022-08-24&#x2F;" rel="nofollow">https:&#x2F;&#x2F;plaintextsports.com&#x2F;all&#x2F;2022-08-24&#x2F;</a><p>[2]: <a href="https:&#x2F;&#x2F;plaintextsports.com&#x2F;wnba&#x2F;2022-08-24&#x2F;conn-dal" rel="nofollow">https:&#x2F;&#x2F;plaintextsports.com&#x2F;wnba&#x2F;2022-08-24&#x2F;conn-dal</a><p>[3]: <a href="https:&#x2F;&#x2F;plaintextsports.com&#x2F;mlb&#x2F;2022-08-24&#x2F;laa-tb" rel="nofollow">https:&#x2F;&#x2F;plaintextsports.com&#x2F;mlb&#x2F;2022-08-24&#x2F;laa-tb</a>
评论 #32588923 未加载
评论 #32589817 未加载
评论 #32588999 未加载
评论 #32589077 未加载
评论 #32589374 未加载
评论 #32589161 未加载
评论 #32589775 未加载
评论 #32589648 未加载
评论 #32589974 未加载
agraddyover 2 years ago
This is a really great breakdown of the TCP slow start algorithm. I always try to keep sites as lean as possible, but this was an aspect of TCP that I wasn&#x27;t familiar with but will definitely be keeping it in mind in the future.
WantonQuantumover 2 years ago
Some sites break the TCP standard by sending the whole contents of the landing page without waiting for the first ACK even it&#x27;s more than 10 packets.
评论 #32590698 未加载
majkeover 2 years ago
Shameless plug<p><a href="https:&#x2F;&#x2F;blog.cloudflare.com&#x2F;when-the-window-is-not-fully-open-your-tcp-stack-is-doing-more-than-you-think&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.cloudflare.com&#x2F;when-the-window-is-not-fully-ope...</a><p>I recently wrote a piece about specifically this mechanism (though looked from the receiver side).<p>Basically on linux you can work around this initcwnd limit (if you have to, for whatever reason), by tuning buffer sizes, initcwnd obviously, and rcv_ssthresh.
fragmedeover 2 years ago
FWIW, the HN frontpage is 33kB. It&#x27;s one of the better performing websites I frequent.
评论 #32589883 未加载
评论 #32590075 未加载
评论 #32590629 未加载
ksecover 2 years ago
Are there any reason why we cant have TCP slow start initial window to 100 packets or higher?<p>I could easily see 95% of internet could be 150KB page on first load.
评论 #32593659 未加载
评论 #32593201 未加载
评论 #32593115 未加载
评论 #32594401 未加载
kukxover 2 years ago
&quot;b&quot; in kb means bits. While the uppercase letter &quot;B&quot; denotes bytes. There is almost an order of magnitude difference between these two units! Usually 1B = 8b.
stasmover 2 years ago
Tangentially related: <a href="https:&#x2F;&#x2F;js13kgames.com" rel="nofollow">https:&#x2F;&#x2F;js13kgames.com</a> is currently going on -- the challenge is to build an HTML&#x2F;CSS&#x2F;JS game which compresses down to 13,312 bytes or less.
motoboiover 2 years ago
So cute to see this in the era of JavaScript frameworks.<p>I remember 10 years ago this being a thing and google keeping theirs at 14kb.<p>Today, if not server side rendered, you&#x27;ll need react lib or equivalent to load your site and boi, that&#x27;s a little over 14kb.
sokoloffover 2 years ago
Headline restates the sizes in a way that makes them somewhere between ambiguous and wrong. The article gets the unit correct (B for bytes) while the headline swapped in b for B, which is generally bits.
julienmarieover 2 years ago
It&#x27;s true but not realistic as soon as the website is more than a blog or a static content website. The goal of good web building is to manage to deliver the most value to consumers and the business, and removing what&#x27;s not needed, and if you add anything, you make it on a performance oriented way. Bloat will always infiltrates itself, so you must clean again and again. I operate e-commerce websites and we went through multiple iterations with two goals in minds : performance ( speed &#x2F; core vitals &#x2F; seo ), and developer productivity (I&#x27;m basically the only tech guy, and I&#x27;m also the CEO managing 10 people). Our current e-commerce stack runs 99% on Phoenix Live view. As our market is only in 1 country (Philippines) we optimize for round trip network with servers the closest possible ( no decent hosting company in the country so we host in HK at datapacket on a beefy dedicated ). Site loads in less than a second, navigation is nearly immediate thanks to live view. We removed most JS trackers as we built our own server side tracking pipeline in Elixir that sends unified data where it&#x27;s needed ( it took us like 2 days to build ). Since that move Google loves us and we are the top ranking website for our niche in the country on all our key products. One key thing also is that our target market is wealthy so they enjoy fast data &#x2F; connection, this helps in terms of determining our target. Performance is not absolute. It&#x27;s relative to your product, your market and your location.
评论 #32589110 未加载
评论 #32592823 未加载
评论 #32589265 未加载
kambanover 2 years ago
I read it. This is new to me, and I guess one needs to remove so many tags and tracking tools. I hope it only counts to a single server. What happens with the data loaded from CDNs?
bradley_tauntover 2 years ago
Or just go absolute foolishly extreme and have your website under 1kB total ;)<p><a href="https:&#x2F;&#x2F;1kb.club" rel="nofollow">https:&#x2F;&#x2F;1kb.club</a>
merpkzover 2 years ago
so the hot takeaway here is that CSS must absolutely be embedded in HTML header so that browser does not make two requests to start rendering page in question. Also if page is using TLS and it most likely is, this all falls apart because initial handshake will do at least one round trip and kill all the speed of loading resource.
anonyfoxover 2 years ago
Aside from the raw size, there are more optimizations that can be done while still having a modern-ish visual result<p>(Shameless self plug: <a href="https:&#x2F;&#x2F;anonyfox.com&#x2F;blog&#x2F;need-for-speed&#x2F;" rel="nofollow">https:&#x2F;&#x2F;anonyfox.com&#x2F;blog&#x2F;need-for-speed&#x2F;</a> )
indigodaddyover 2 years ago
Is the dev.to version of this article under 14k I wonder?
评论 #32588689 未加载
评论 #32588662 未加载
subhashchyover 2 years ago
This is very cool. In the age if bloated JS frameworks and Bulky Desktop sites loaded on Mobile devices, its refreshing to see someone putting efforts to make the pages fit in a single MTU.<p>However, just page size is half the story.<p>Look at the screenshots below -<p>#1 - Here you can see this page (9KB) - 110ms - <a href="https:&#x2F;&#x2F;i.imgur.com&#x2F;qeT2Az0.jpg" rel="nofollow">https:&#x2F;&#x2F;i.imgur.com&#x2F;qeT2Az0.jpg</a><p>#2 - Another page, 29 KB in size - 42ms. <a href="https:&#x2F;&#x2F;i.imgur.com&#x2F;tWsLGr1.jpg" rel="nofollow">https:&#x2F;&#x2F;i.imgur.com&#x2F;tWsLGr1.jpg</a><p>Both on same network (Internet), same computer.<p>1st one (This article) is served by Netlify and AWS (Static hosting).<p>2nd is an ecommerce store on Dukaan (ecommerce platform for India), I am affiliated with.
评论 #32593670 未加载
评论 #32593751 未加载
spoonjimover 2 years ago
One of my favorite stats is that a VisiCalc screenshot is larger than the VisiCalc executable.
soperjover 2 years ago
This made me check my own site[1], the page itself is tiny(3kb). It&#x27;s the images that get me, and they&#x27;re svgs. Gotta be something wrong there too, an svg shouldn&#x27;t be 75kb.<p>edit: nevermind, svg is 13kb, don&#x27;t know what I was mistaking there.<p>[0] - www.reciped.io
评论 #32591531 未加载
评论 #32593534 未加载
alexmingoiaover 2 years ago
<a href="https:&#x2F;&#x2F;sumi.news" rel="nofollow">https:&#x2F;&#x2F;sumi.news</a> HTML is ~14KB when transferred with compression. The CSS is ~30KB. I could probably slash that in half if I optimized.
评论 #32590458 未加载
评论 #32590129 未加载
smarkovover 2 years ago
Honestly, &quot;should&quot; is a bit of a click-baity exaggeration. In this day and age where internet speeds are faster and more stable than ever, these kinds of tips should be at the very bottom of your optimisations checklist. I don&#x27;t care if your website takes 3 seconds to load or 5, what I do care about is that once the website has loaded, my inputs respond as quickly as possible. Reddit for example is total garbage when it comes to responsiveness, clicking on a post literally freezes the page for 1+ seconds on a fairly capable PC.
评论 #32589584 未加载
评论 #32589027 未加载
评论 #32588948 未加载
评论 #32589360 未加载
评论 #32588946 未加载
anigbrowlover 2 years ago
Great piece. took me back to the figuring out TCP at 2400 bps back in the dial-up era. The bit on satellites made me wonder if there&#x27;s room for storage servers&#x2F;relays in space.
kikkiover 2 years ago
Unrelated, but I found reading this post very easy. Something about the colors and font choices worked well for my brain which struggles recently to parse most long-form content..
评论 #32589163 未加载
3pmover 2 years ago
I think 14KB &#x27;rule&#x27; is less relevant these days, but is a good mnemonic to &quot;put the most critical data at the start of the page&quot;. Even if this page has to be large, browsers are streaming it and can start processing before it is fully consumed.<p><a href="https:&#x2F;&#x2F;www.tunetheweb.com&#x2F;blog&#x2F;critical-resources-and-the-first-14kb&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.tunetheweb.com&#x2F;blog&#x2F;critical-resources-and-the-f...</a>
gcauover 2 years ago
Some kind of actual measurements&#x2F;tests would be nice, like put up a 14kb and 15kb+ page and measure them to demonstrate the apparent speed difference really exists.
shultaysover 2 years ago
<p><pre><code> Once you lose the autoplaying videos, the popups, the cookies, the cookie consent banners, the social network buttons, the tracking scripts, javascript and css frameworks, and all the other junk nobody likes — you&#x27;re probably there. </code></pre> Wouldn&#x27;t videos and images (I guess css&#x2F;js files as well?) loaded separately and be part of other messages?
patrickaljordover 2 years ago
Even google.com is 45kb. HN is 8kb and it&#x27;s almost text-only with almost no js, almost impossible for any website nowadays.
dreamcompilerover 2 years ago
The section on satellite internet should probably be updated to clarify that LEO satellite networks like Starlink orbit at 1&#x2F;100 the distance of GEO satellites, so the parts of the latency calculation involving uplink and downlink become much less important. (The rest of the numbers in the latency calculation still apply.)
评论 #32594853 未加载
iamsaitamover 2 years ago
Interesting find. On the other hand, it&#x27;s not a one size shoe fits all metric. If the interaction with your website is mainly reading text, then sure it&#x27;s a valid take. Otherwise you should really just forget about it and use focus on other best practices for providing a good early user experience.
sdezielover 2 years ago
Nice article! However some numbers are a bit off:<p>The IPv4 overhead is normally 20 bytes but can reach 60 bytes with many options. For TCP, it&#x27;s between 20 and 60 bytes as well.<p>Just ran a quick tcpdump on Linux and curl&#x27;s TCP connection uses 32 bytes TCP headers (12 bytes of options).
tlarkworthyover 2 years ago
This is to minimize the round trips, I think a saner solution is have content served from many edge locations nearer the user so the impact of a roundtrip is so much less. Consumers and business users definitely want jazzy websites and 14kb is not able to do much.
nzachover 2 years ago
What does this means, if anything, for API calls between services in a microservices context ?<p>Should we worry about this specific size threshold when making calls between services on kubernetes or the kubernetes ecosystem is smart enough to avoid this slow start problem ?
issungover 2 years ago
What CSS does the author use to achieve that &quot;sketchy&quot; effect on the orange headings?
评论 #32589139 未加载
评论 #32589128 未加载
lionkorover 2 years ago
I find my own site [0] to be quite fast, since most of it is pretty aggressively cached and its hand-written. Mobile is slightly broken, but still.<p>[0] <a href="https:&#x2F;&#x2F;kortlepel.com" rel="nofollow">https:&#x2F;&#x2F;kortlepel.com</a>
lenkiteover 2 years ago
content-length: 31367 for this page, so looks like the author couldn&#x27;t do it either. How can us mere mortals ?<p>A more realistic target: <a href="https:&#x2F;&#x2F;512kb.club&#x2F;" rel="nofollow">https:&#x2F;&#x2F;512kb.club&#x2F;</a>
评论 #32591140 未加载
pkilgoreover 2 years ago
The athletic.com routinely takes 2-5 seconds to load a page on my mobile phone connected to a 600MBPS down line (when it doesn&#x27;t 500).<p>I still use it.<p>So, sure, this is awesome but it might not be something worth optimizing for if you want to make money.
memorableover 2 years ago
My site is not under 14KB (15.17KB of HTML, to be precise), but it loads pretty damn fast and I&#x27;m proud of it.<p><a href="https:&#x2F;&#x2F;tsk.bearblog.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;tsk.bearblog.dev&#x2F;</a>
punkpeyeover 2 years ago
What platform did you use to build your website? I like how fast it loads!
评论 #32589945 未加载
xwdvover 2 years ago
Does this mean your website should also only use HTTP for maximum speed.
评论 #32592861 未加载
评论 #32589105 未加载
rozenmdover 2 years ago
Neat, I was wondering why <a href="https:&#x2F;&#x2F;hackernews.onlineornot.com" rel="nofollow">https:&#x2F;&#x2F;hackernews.onlineornot.com</a> loads so fast (&lt;14kb)
wiradikusumaover 2 years ago
So 14kb for 1 file? (Index.html) meaning we should ensure that the supporting assets (css, js, images) are set non-blocking so at least people can see the content first?
BobMitover 2 years ago
Come on with those optimizations. the internet is getting faster and I still see articles on how to optimize the website.
quickthrower2over 2 years ago
I wonder... am I good if the static render is &lt; 14kb, but I load React etc. and hydrate for progressive addition of interactivity?<p>Probably for a blog, if the readable content is in that static render, it would be a reasonable experience. A couple of seconds later the cool interactive parts come to life.<p>===<p>PageSpeed Insights scores:<p>Performance: 100% First Contentful Paint: 0.9 s Time to Interactive: 0.9 s Speed Index: 0.9 s Total Blocking Time: 0 ms Largest Contentful Paint: 0.9 s Cumulative Layout Shift: 0<p>Meh. Not bad.<p>Ok it&#x27;s very good. Perfect. When you click around, it doesn&#x27;t seem like a traditional client&#x2F;server app, but like a SPA. Without being one!
评论 #32589614 未加载
pvinisover 2 years ago
Interesting poat, but what I really liked is the layout, font, bottom tags section, link to dev.to, etc. Very cool!
armchairhackerover 2 years ago
Do you get the benefits if your HTML and CSS are under 14kb, but your images and JS requests aren&#x27;t?
评论 #32589628 未加载
4m1rkover 2 years ago
The writer is not considering that each asset will be a separate connection or am I missing something?
tamsaraasover 2 years ago
Is the post joke? Are there any network technical who can explain that the packet can have different size and modified by different routers inside chain of path from source to destination? I mean some kind of absurd topic. And everyone instead of reading ethernet standard and teaching materials about this OSI level, start to debate about this thing.
评论 #32594526 未加载
评论 #32604143 未加载
douchescriptover 2 years ago
14 kB HTTP site. What about the SSL?
layer8over 2 years ago
Note that you have to count the HTTP headers in those 14600 bytes, not just the HTML.
mahoroover 2 years ago
BTW you can also open multiple connections and fetch 14kb from each of them quickly
lekeover 2 years ago
The network tab says my site is 145b cached as I get my content sent from github.
评论 #32589732 未加载
truth_seekerover 2 years ago
Don&#x27;t you forget &quot;Content-Encoding: gzip&quot; in HTTP header.
nnxover 2 years ago
Is this still valid advice for HTTP&#x2F;3 based on UDP?
EVa5I7bHFq9mnYKover 2 years ago
For reference, average web page size today is 3MB.
tambourine_manover 2 years ago
&gt;There are other <i>used</i> of the web<p><i>uses</i><p>&gt;This this maximum is not set by<p>Double this
barrystaesover 2 years ago
&gt; That leaves 1460 bytes per TCP packet. 10 x 1460 = 14600 bytes or roughly 14kB!<p>Where does the 10 suddenly come from?
Joyfieldover 2 years ago
kb != kB.
immibisover 2 years ago
14kB, what is that? I thought the web had a minimal file size of the entire original DOOM game.
lgatsover 2 years ago
what’s the average size you get when un-gzipping 14kb of html?
coinover 2 years ago
What about the headers?
k3liutZuover 2 years ago
Crying in MB of JS
jillesvangurpover 2 years ago
Of course with HTTP3, we&#x27;ll get TCP out of the equation as that uses UDP&#x2F;Quic underneath. If you pick the right CDN&#x2F;hosting&#x2F;web server, you can benefit from that right now. Supported on essentially all relevant phones, browsers, etc. So, why wait? If you care about performance, upgrading your infrastructure is probably the first thing you should do, not the last thing.<p>Mostly, the only effect of bigger download sizes is a higher chance for things to go wrong on flaky networks (e.g. on mobile) and a slight delay with the application initializing. On the first visit. The second visit, you can have all the assets cached and it matters much less. At that point the only thing slowing you down is what the application does.<p>It&#x27;s 2022. An article arguing how to get the most out of obsolete versions of HTTP (&lt;3) and TCP seems a bit redundant as you shouldn&#x27;t be using either if you can avoid it. Also, anything using less bytes than the commodore 64 that I had 40 years ago had in memory is interesting but also a bit of an exercise in being overly frugal. You should reflect on the value of your time and effort. There&#x27;s a notion of diminishing returns that are very expensive. Such is the nature of optimization. Sometimes a millisecond is priceless. But mostly it&#x27;s irrelevant. People have 5G and 4G phones these days capable of downloading many orders of magnitude more data per second than that.<p>Download size is probably the wrong thing to focus on for most applications. I get it, engineers are deeply passionate about optimization and minimalism. And I appreciate what can be done with very little CSS and HTML from a technical point of view. But it&#x27;s just not relevant to me on my work projects. I&#x27;d rather spend time on adding value than obsessing over saving a few kilo bytes here and there. People pay for one thing and barely even notice the other thing.<p>I ship a quite bloated SPA to customers. It comes in around 10MB and takes a couple of seconds to get going. It&#x27;s fine; it&#x27;s not a problem. I could double that size and nothing would happen. Nobody would complain. We sell it for lots of money because of what it does, not because of how large or small it is. The value of halving that size is close to 0$ for us. The price of doubling the size is also close to that. The price of sacrificing features on the other hand would be a massive loss of value. Our sales team would object. And yes, we use a Google Cloud&#x27;s load balancer and their CDN that does all the right things. If it mattered, I might find slightly faster options. But it just doesn&#x27;t.<p>And 10MB is actually not that bad on a decent network and nothing compared to what our application does after it loads in any case. Which would be doing lots of json API traffic, downloading map tiles and images, etc. In short, if you are not on a good network, using our app is going to suck. The initial download size would be the least of your problems in that case. And if you are on a decent network, the app loads quickly and feels very responsive. Our app simply requires a decent network. And decent networks are a widely available commodity.
personjerryover 2 years ago
Why your website should have less than 11 fonts in the first 3 sentences: So I can read it
scottmfover 2 years ago
There&#x27;s much more to a fast website than ttfb&#x2F;fmp on a single page load with a cold cache. The fact this kilobyte fetishism on HN is still so rife in 2022 is ridiculous.<p>Edit: I wrote this after reading some comments. The article is interesting and not an attack on its author.