Learn
Best CDN for Video Streaming in 2026: Full Comparison with Real Performance Data
Best CDN for Video Streaming in 2026: Full Comparison with Real Performance Data If you are choosing the best CDN for ...
A 53 ms difference in Time-to-Interactive cost one e-commerce PWA 11% of its conversions during a Q1 2026 A/B test. The culprit was not application code. It was a misconfigured cache-control header on the app shell served from origin instead of edge. Progressive web app deployment fails or succeeds at the infrastructure layer long before users notice the UI. This article gives you the architectural playbook: how CDN caching and service worker caching coordinate (and where they collide), the cache-control headers that actually matter for PWA assets in 2026, a failure-mode analysis you will not find in other guides, and concrete threshold values for cache TTLs, precache budgets, and update propagation windows.

Two shifts reshaped progressive web app deployment this year. First, Chrome 126 (stable April 2026) began enforcing stricter byte-for-byte integrity checks on service worker scripts fetched through intermediary caches, which means CDN-level recompression or minification that alters the response body will silently break service worker updates. Second, the HTTP Working Group's draft for Cache Groups (an extension to Cache-Control) entered interop testing in Q2 2026, giving CDN operators finer-grained invalidation semantics that map directly to the asset-versioning patterns PWAs already use.
The practical consequence: teams that treated CDN configuration as "set Cache-Control: max-age and forget" are now debugging stale service workers in production. The coordination between edge cache, browser HTTP cache, and the CacheStorage API that service workers manage is a three-layer problem, and getting any layer wrong cascades.
Every progressive web app deployment that runs through a CDN operates across three distinct cache layers. Treating them as one is the root cause of most update-propagation bugs.
The CDN stores responses keyed by URL (and Vary headers). TTLs here determine how fast a purge reaches users. For PWA app shells, a TTL above 60 seconds introduces a window where users receive a stale shell that references hashed asset URLs the CDN may have already purged. In 2026 best practice, the app shell (typically index.html or the navigation response) should carry Cache-Control: s-maxage=0, stale-while-revalidate=30. This forces the edge to revalidate on every request while serving the previous version during the revalidation window, keeping TTFB under 50 ms in the p99 case.
Browsers respect Cache-Control on fetched resources independently of service worker logic. Hashed static assets (JS bundles, CSS, images with content hashes in the filename) should carry Cache-Control: public, max-age=31536000, immutable. The immutable directive, now supported across all major browsers as of early 2026, prevents conditional revalidation requests entirely for these assets.
The service worker's precache manifest pins specific URLs and revision hashes. When a new service worker activates, it fetches updated assets. If the CDN edge still serves stale versions of those assets (because the purge has not propagated), the new service worker caches stale content — and users are stuck on it until the next SW update cycle. This is the single most common deployment failure in CDN-backed PWAs.
Purge hashed assets from the CDN edge before deploying the new service worker. If your CI/CD pipeline deploys both simultaneously, add a 15–30 second delay between asset upload and service worker update. Workbox 7.2 (released March 2026) supports a precacheWarmupDelay option that handles this at the library level.
The table below reflects 2026 best-practice headers for each PWA asset class when served through a CDN. These values assume the CDN supports stale-while-revalidate and purge-by-tag or surrogate keys.
| Asset Type | Cache-Control Header | CDN TTL | Rationale |
|---|---|---|---|
| App shell (index.html) | s-maxage=0, stale-while-revalidate=30 | 0 s (revalidate every hit) | Ensures latest SW registration tag; SWR keeps latency low |
| Hashed JS/CSS bundles | public, max-age=31536000, immutable | 1 year | Content-hash guarantees uniqueness; immutable eliminates conditional requests |
| Service worker (sw.js) | no-cache, must-revalidate | 0 s | Chrome 126+ byte-check requires fresh response; any edge caching risks update failure |
| Web app manifest | s-maxage=3600, stale-while-revalidate=86400 | 1 hour | Manifest changes are infrequent; long SWR window is acceptable |
| API responses (dynamic) | private, no-store | Not cached at edge | Let the service worker handle runtime caching strategies (stale-while-revalidate or network-first) |
This section addresses the failure patterns that surface after a CDN-backed PWA has been running in production for months — not the day-one configuration errors, but the slow-burn operational issues.
A CDN edge node in a region with low traffic holds a stale copy of sw.js past its expected TTL because no request triggered revalidation. Users in that region receive the old service worker, which references old precache URLs. Those old assets have been purged. The service worker install event fails silently (the fetch for a missing asset returns a 404, but Workbox's default behavior is to treat that as a cache miss, not an installation failure). The user is stuck on the previous version with broken offline support. Fix: set the service worker's Cache-Control to no-cache, must-revalidate and never rely on CDN TTL for sw.js expiration.
As of 2026, Chrome enforces a per-origin storage quota that is typically 60% of available disk on mobile. But the practical limit for precache is much lower. Precaching more than 25 MB of assets causes install-time latency spikes on mid-tier Android devices (Snapdragon 6-series, 4 GB RAM), and Workbox 7.x will log a warning above 20 MB. If your PWA deployment pushes 40 MB of precached assets through the CDN, you are paying for edge bandwidth that the service worker may never successfully write to CacheStorage on constrained devices. Audit your precache manifest quarterly.
When a PWA caches assets from a third-party CDN domain (e.g., fonts, analytics scripts), the CDN must return consistent Vary headers. If one edge node returns Vary: Accept-Encoding and another returns Vary: Accept-Encoding, Origin, the service worker CacheStorage may store a response keyed incorrectly, causing a future cache hit to return a response with mismatched CORS headers. The browser then blocks the resource. This is especially pernicious because it manifests intermittently across regions.
The performance case for CDN-backed progressive web app deployment is straightforward in concept but nuanced in measurement. Raw TTFB improvement from edge delivery typically lands between 40–120 ms depending on user distance from origin, but the compounding effect matters more: the app shell loads faster, the service worker registers earlier, and the precache install phase begins sooner. In 2026 field data from large PWAs, the median Time-to-Interactive delta between CDN-served and origin-served app shells is 380 ms on mobile connections.
For teams running PWAs at enterprise scale — hundreds of terabytes of monthly edge transfer across app shells, static assets, and runtime-cached API proxies — cost becomes the binding constraint, not performance. BlazingCDN offers volume-based pricing that starts at $4 per TB ($0.004/GB) and scales down to $2 per TB at the 2 PB tier, delivering stability and fault tolerance comparable to Amazon CloudFront at a fraction of the cost. Their 100% uptime commitment and fast scaling under traffic spikes make them a practical choice for PWA deployments where cost-per-GB directly impacts the business case for aggressive precaching and edge-first architecture.
Deploy hashed static assets first and confirm CDN propagation, then deploy the updated service worker file. The service worker script itself must never be edge-cached with a positive TTL. Use no-cache, must-revalidate on sw.js to ensure byte-freshness on every fetch, which Chrome 126+ requires for update detection.
The CDN handles TLS termination at the edge (reducing handshake latency), serves as the HTTP/2 or HTTP/3 endpoint for multiplexed asset delivery, and provides origin shielding that collapses concurrent cache-miss requests into a single origin fetch. For PWAs, this origin shielding is critical during deployments when many users simultaneously request a new app shell.
Yes, but only if the third-party CDN returns correct CORS headers (Access-Control-Allow-Origin) and consistent Vary headers across all edge nodes. The service worker must fetch cross-origin assets in cors mode. Opaque responses (from no-cors fetches) consume a padded 7 MB each in CacheStorage quota, which will exhaust your storage budget quickly.
On repeat visits, the service worker serves assets from CacheStorage, bypassing both the CDN and the browser HTTP cache entirely. The CDN's value on repeat visits is limited to assets not in the precache manifest — runtime-cached API responses, lazily loaded images, or third-party resources. The CDN's primary performance contribution is on the first visit and during service worker update cycles.
App shell: s-maxage=0, stale-while-revalidate=30. Hashed bundles: public, max-age=31536000, immutable. Service worker: no-cache, must-revalidate. Manifest: s-maxage=3600, stale-while-revalidate=86400. These settings reflect Chrome 126 requirements and assume CDN support for stale-while-revalidate.
Pick one production PWA this week. Open DevTools, navigate to Application > Service Workers, and trigger an update check. Then open the Network tab and verify the response headers on sw.js, index.html, and two hashed bundles. Compare what you see against the table above. If your service worker script returns with a positive max-age, you have a ticking deployment bug. If your app shell has immutable set, you have an update-propagation problem waiting to surface during your next release. Fix the headers, run a Lighthouse trace before and after, and measure the TTI delta. That number is your CDN configuration's actual value in milliseconds.
Learn
Best CDN for Video Streaming in 2026: Full Comparison with Real Performance Data If you are choosing the best CDN for ...
Learn
Video CDN Providers Compared: BlazingCDN vs Cloudflare vs Akamai for OTT If you are choosing a video CDN for an OTT ...
Learn
Video CDN Pricing Explained: How to Stop Overpaying for Streaming Bandwidth Video already accounts for 38% of total ...