vanderhoop

vanderhoop

Ah, I should clarify. When I say I recommend a CDN for assets, I don’t mean the old school shared CDN, as those are no longer useful due to the sandboxing security change you mentioned above. I was referring to hosting your static assets via a CDN service like AWS Cloudfront or Azure Front Door rather than relying on your origin server to serve them, but I should have made that clearer.

Out of the box, using an asset CDN at a different domain or subdomain would introduce another DNS lookup, but that one additional lookup should be minimal and hopefully unfelt if you leverage HTTP 103 for preemptive preconnects/preloads, which, thankfully, are getting broader and broader browser support.

0
Post #11
tj0

tj0

Understood. I don’t think that ends up making much of a difference as an extra lookup and an extra tcp connection is there anyway.

I need to understand the effect of HTTP 103 a little better, but it’s useful to divide the user experience into several buckets.

  • Frustrated. Users want consistency, even if it’s slow consistently. Frustration is caused by tail latencies. I’ve experienced it myself and seen the “Connecting to x.y.z” hang for 10-15 seconds and having the site half-render. Or “Looking up x.y.z…” Probably will never hear from these users because they’ll just quit using your site. So I made everything come from a single domain to avoid this problem.
  • Acceptable. Most sites are slow, janky, filled with ads, so the bar is pretty low. You don’t have to make any effort.
  • Happy. The site has to be fast and user-friendly. Performance is a feature. Optimizing for user tasks is a feature. The combination is excessively rare, so combine the two and you’ll get have genuinely happy people thank you.

The transfer sizes:

  • compressed page is 60kB.
  • compressed css is 10kB
  • compressed js is 90kB.
  • fonts are 166kB

The first load for critical path requires 70kB. Another 90kB for interactivity. And finally the fonts adjust the cumulative layout shift slightly which don’t matter.

Since I’m trying to avoid frustrated users, from my experience, the overhead of DNS and SSL connection establishment over low-performance connections matters more than the raw size.

0
Post #12
— All posts loaded —