5 ms·
It's relatively straightforward. Take a look at what Pingdom tells you it does when the site loads: http://tools.pingdom.com/fpt/#!/cnYAuq/https://news.ycombi
by Twirrim 11y ago
It's relatively straightforward. Take a look at what Pingdom tells you it does when the site loads:
http://tools.pingdom.com/fpt/#!/cnYAuq/https://news.ycombinator.com/item?id=9990630 http://tools.pingdom.com/fpt/#!/cnYAuq/https://news.ycombina...
5 requests, Total size 12.6kB, total time 661ms. 1 request for the content, 1 for css, and then 3 gifs, all from a single domain (so just one DNS request). If you look at the profile, 47% of the time was spent doing that one DNS lookup, so subsequent requests will be even quicker (plus caching will handle those gifs just fine)
That's almost no work for the end client to do. No javsacript for the client to download, parse and process, just straight content to render and done.
The reduced request count is especially important when it comes to the mobile experience, where bandwidth might be great, but latency is terrible. Every request you have to make to render a page significantly impacts the loading time (HTTP2 helps here). Along with trying to reduce the number of resources being loaded on the screen, it's especially important to reduce the number of domains you're getting them from so you keep the DNS queries down.
- d357r0y3r 11y agoMight be able to get that down to 5 requests if they use .pngs instead of .gifs and throw them into a sprite sheet.
- ised 11y ago"... (so just one DNS request)." Are you sure? request #1 1 news.ycombinator.com: 207 bytes, 1+0+4+2 records, response, noerror query: 1 news.ycombinator.com authority: ycombinator.com 172800 NS ns-225.awsdns-28.com request #2 1 news.ycombinator.com: 225 bytes, 1+1+4+0 records, response, authoritative, noerror query: 1 news.ycombinator.com answer: news.ycombinator.com 300 CNAME news.ycombinator.com.cdn.cloudflare.net authority: ycombinator.com 172800 NS ns-1411.awsdns-48.org request #3 1 news.ycombinator.com.cdn.cloudflare.net: 367 bytes, 1+0+5+10 records, response, noerror query: 1 news.ycombinator.com.cdn.cloudflare.net authority: cloudflare.net 172800 NS ns1.cloudflare.net request #4 1 news.ycombinator.com.cdn.cloudflare.net: 89 bytes, 1+2+0+0 records, response, authoritative, noerror query: 1 news.ycombinator.com.cdn.cloudflare.net answer: news.ycombinator.com.cdn.cloudflare.net 300 A 198.41.190.47 A HOSTS file entry for HN will avoid this routine.
- Twirrim 11y agomaybe I should rephrase that as one outbound DNS query? The answer should be cached locally, or at least at your next hop resolver, and the TTL of 300 seconds is long enough to make it effective
- kluck 11y agoThere was a thread about slow web: https://news.ycombinator.com/item?id=9791606 https://news.ycombinator.com/item?id=9791606 I prefer a static site without JavaScript any time of day! (over a JS bloated webs(h)ite)