CDN Origin Shielding in 2026: Multi-Tier Cache, Cache Hit Ratio, and TTFB
How CDN origin shielding raises cache hit ratio and cuts origin TTFB. Setup for Fastly, Cloudflare, and CloudFront with Cache-Control tips and debug headers.
We run Web Perf Clinic as a working notebook for the engineers who actually own the LCP graph in PageSpeed Insights on Monday morning. Every article here starts from a real production trace, a real CrUX regression, or a real Lighthouse CI budget that just broke a deploy. Our team writes for staff frontend engineers, SREs and performance-curious product folks who want fewer adjectives and more flame charts.
Since Interaction to Next Paint replaced FID as a Core Web Vital in March 2024, INP has quietly become the metric that decides whether your shipping React app is fast or merely fast on a Pixel 9. We track the long tail: how to find Long Animation Frames in real user data, how to break up 200ms event handlers without resorting to setTimeout cargo-culting, and why scheduler.yield() finally makes cooperative scheduling practical in Chromium-based browsers.
We publish step-by-step teardowns of slow INP on the usual suspects: hydration-heavy Next.js routes, Algolia-style autocompletes, and dashboards that re-render on every keystroke. Expect annotated DevTools Performance traces, before/after RUM screenshots from web-vitals.js, and patches you can copy into a PR.
Synthetic Lighthouse runs lie politely; real user monitoring tells you which Samsung A-series device in São Paulo just experienced a 1.8s INP on your checkout button. The catch: most commercial RUM scripts weigh 40-90 KB of gzipped JavaScript and ironically degrade the very metrics they measure. We benchmark the lightweight options — web-vitals piped to your own collector, OpenTelemetry browser SDK, Cloudflare Web Analytics, SpeedCurve LUX — and show you exactly how many bytes and main-thread milliseconds each one costs.
Our team also documents the boring-but-critical parts: sampling strategy at scale, attributing INP to specific React components via the Event Timing API, and building Grafana dashboards that surface p75 CWV by route, country and device class without blowing your observability bill.
Images remain the single largest lever for Largest Contentful Paint, and yet most teams still ship 1600px JPEGs to 360px phones. We dig into modern pipelines end-to-end: AVIF vs WebP encoding tradeoffs in 2026, the right srcset + sizes math for responsive heroes, fetchpriority="high" on the LCP candidate, and when link rel=preload helps versus when it just steals bandwidth from your CSS.
You'll find comparisons of the major resizers — Cloudflare Images, Cloudinary, imgproxy, Vercel Image Optimization, Netlify Image CDN — measured on cold-cache TTFB, encoded size, and CDN cache-hit ratios. We also cover the underrated wins: native lazy-loading rules, Client Hints in 2026, and why the <picture> element is still the most reliable way to ship AVIF with a WebP fallback.
Scroll down for our latest articles — fresh teardowns, migration notes from real production codebases, and the occasional vendor benchmark we ran so you don't have to. If a piece saves you an afternoon, that's the bar we're aiming for.
How CDN origin shielding raises cache hit ratio and cuts origin TTFB. Setup for Fastly, Cloudflare, and CloudFront with Cache-Control tips and debug headers.
Move GTM, GA4, and Meta Pixel into a web worker with Partytown. Real INP numbers, framework setup, dataLayer forwarding, and the caveats that break analytics.
The NotRestoredReasons API is how you learn, per real user navigation, why Chrome refused to restore your page from bfcache. Here's the RUM snippet I ship in production, the full 2026 blocker list, and how to fix each one.
Learn how to optimize First Contentful Paint below 1.8s at p75. Covers TTFB reduction, render-blocking CSS, web fonts, 103 Early Hints, and Speculation Rules prerender with production code.
Understand every value of the CSS contain property (layout, paint, size, strict, content) with 2026 browser support notes, DevTools workflow, and real-world INP wins.
How CDN cache tags and surrogate keys work in 2026: headers, purge APIs, and stale-while-revalidate pairing on Fastly, Cloudflare, Vercel, Netlify, and Akamai.
Cross-origin resources report zero for duration, transferSize, and every phase timing unless the server emits Timing-Allow-Origin. Set it correctly on CDN, S3, or your API to unlock full Resource Timing and honest RUM data.
A third-party script facade is a static placeholder that loads no third-party JavaScript until the user interacts with it. In field data, swapping a YouTube iframe for a facade cuts LCP by 40% on mobile 4G. Here is the 2026 pattern for YouTube, Twitter, Maps, and chat widgets.
How to use native loading="lazy" for images and iframes without breaking LCP. Covers Chrome 2026 heuristics, fetchpriority combos, iframe deferral, CLS prevention, and SEO.
The Chrome DevTools Performance Insights sidebar diagnoses Core Web Vitals from a single trace. Here's how to record the right trace, read the LCP/INP/CLS subpart breakdowns, and use Live Metrics to catch regressions without leaving the panel.
Learn how the No-Vary-Search response header lets Chrome 141 reuse prefetches and disk cache entries across utm_ and other query parameters, with copy-paste recipes and debugging tips.
A passive event listener promises the browser you won't call preventDefault(), so the compositor thread can scroll immediately without waiting for JavaScript. Here's how I audit and fix the third-party offenders that still ship blocking touchstart and wheel handlers in 2026.
Choose your preferred language to explore our content