now at >59% adoption • HTTP/3 in 2021/22, now at >30% adoption • Brotli baseline in 2017 • Fetch Priority & Resource Hints • HTML & CSS continually replacing JavaScript
by ‘upgrading’ resources. Achieve the best of both worlds: the cache granularity of individual small files with the compression ratios of concatenated bundles.
with dictionary app.v1.js No dictionary (yet) Use-As-Dictionary: match="/application.*.js" Content-Encoding: br Stores as a dictionary app.v1.js Serves with regular compression Stores file as dictionary app.v2.js Available-Dictionary: :a1b2c3d4e5f6: Accept-Encoding: dcz, zstd, br, gzip Loads dictionary Transmits dictionary hash with request (new release to production)
Party Code Module C Module D footer.v1.js 1st Party Code Module E Module F main.v2.js 1st Party Code (v2) Module A Module B header.v2.js 1st Party Code (v2) Module C Module D footer.v2.js 1st Party Code (v2) Module E Module F
Hover for 200ms Complex viewport heuristics eager Hover for 10ms In viewport for 50ms immediate ASAP in idle time ASAP in idle time Source: docs.google.com/document/d/1YPbtUPfZIDElzBZNx8IQMzRFvy8oauLG_i1XIr6jgTs
hungry Fastest experience, if accurate prerender-until-script Loads full page, until a <script> tag is encountered Preparser runs Fairly heavy on resources Second fastest navigation prefetch Loads only HTML No preparser Least resource hungry Instant TTFB but traditional progressive download experience
on desktop and 180ms on mobile across all percentiles, and across all loading metrics.” Source: performance.shopify.com/blogs/blog/speculation-rules-at-shopify
that stands out. Across the curve, the median gain is -285ms TTFB, -224ms FCP, and -228ms LCP.” Source: performance.shopify.com/blogs/blog/faster-storefront-navigations-with-moderate-speculation-rules
Hides navigation latency View Transitions 3 More cohesive UI 'App like feel' Speculation accuracy less of a concern Reduced TTFB/TTLB latency = more instant loads Less JavaScript = more instant loads