Colin Bendell Profile picture
Jun 21, 2022 β€’ 12 tweets β€’ 7 min read β€’ Read on X
Today, HTTP 103 Early Hints ships with Chrome 103!

Why is this important for #webperf? How did @Shopify help make all merchant sites faster? (LCP over 500ms faster at p50!) 🧡

Hint: A little collaboration w/ @Cloudflare & @googlechrome Image
Speed matters for entrepreneurs. If a buyer experiences a first page load that is 10% faster, on average there is an increase of 7% in conversion. #Unite2021 #LCP #shopify Image
Page loading is more than just TTFB. Every page requires js/css/webfonts/images to create the experience and the order really matters.

(simulated slow network for illustration!)
Imagine ordering coffee. After waiting for the brew and about to take a sip, you are asked if you want cream? Then again later, you are asked if you want sugar? After many round trips, you finally enjoy your cold β˜•οΈ! πŸ˜’
Resource Hints (preconnect, preload) try to help the browser find things faster. But the Link: HTTP header arrives at the same time as the HTML, and the <link> tag is discovered by the renderer moments before the actual <script> or <img> tag Image
HTTP 103 improves this by sending the Resource Hints BEFORE the 200 OK response. This lets the browser open TCP+TLS sockets, grow cwnd, and warm caches ahead of the HTML.

Now the cream and sugar arrives before your hot coffee!
β˜•οΈπŸ˜ Image
On faster connections, this wait time might be very small. But on slower connections, or where there is personalized content, there can be some idle wait time.

HTTP 103 uses this "time in the margin" to help the browser load faster.
Last fall, @googlechrome, @Cloudflare and @ShopifyEng teamed up to run an experiment through #BFCM2021
πŸ‘‰ Using a field trial, 50% of Chrome users had Early Hints enabled
πŸ‘‰ Cloudflare was configured to send 103
πŸ‘‰ Shopify auto generated Resource Hints
The results were spectacular! In every geo, and OS+Browser combination the LCP (Largest Contentful Paint) from our RUM data was more than 500ms faster at the p50!

(box plots are p25, p50, p75 and whiskers are p1 and p99)
#BFCM2021 Image
How does this work?
πŸ‘‰ Shopify automatically generates resource hints
πŸ‘‰ Merchants can annotate their liquid source code to add more hints [1]
πŸ‘‰ Cloudflare caches the Link: header and sends a 103 response on the 2nd request

[1] shopify.dev/api/liquid/fil… Image
What about TTFB? Indeed, the browser is doing more work, warming caches, making TLS connections while waiting for the HTML. This did appear to slow the TTFB by ~20ms at the p50. But a 500ms faster LCP is worth the tradeoff! Image
The best part is this is not just a @Shopify thing, or a @Cloudflare thing. HTTP 103 Early Hints is now available for all web developers to use!

It's shipping in Chrome 103 (and we hope to see it in more browsers soon). Update your browser today!

β€’ β€’ β€’

Missing some Tweet in this thread? You can try to force a refresh
γ€€

Keep Current with Colin Bendell

Colin Bendell Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @colinbendell

May 27, 2020
18% of global Android Chrome users have Lite Mode enabled (aka Save-Data). Digging into the data, I now have more questions than answers. Is this a signal that users want #webperf? Or something else?
(cont…)
First impression: Save-Data gives users what they want, which is a different quality/performance tradeoff. And with @cloudinary’s q_auto it appears to yield a 10% greater consumption. Yay!
But then why is Lite Mode only at 5% in the Americas, while 30+% in Africa and Asia? Is it:
* intentional, users who want better web performance?
* enabled by default by android manufacturers?
* or just cargo-cult stories we tell, like 'enable dark mode to save battery’?
Read 23 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(