⚡ LIVE From Lizard to Wizard · Thursday, May 28 · LIMITED SEATS Save my seat →
Episode 14 1 hour 2 minutes

WebFragments at Scale – With Natalia Venditto & Igor Minar

Key Takeaways from our conversation with Natalia Venditto & Igor Minar

Natalia Venditto & Igor Minar

Principal PM for JavaScript DX at Microsoft • Senior Director of Engineering at Cloudflare, co-creator of Angular

Señors @ Scale host Neciu Dan talks with Microsoft’s Natalia Venditto and Cloudflare’s Igor Minar about WebFragments — a new micro-frontend model that isolates JavaScript and DOM at the browser boundary, enables instant SSR through fragment piercing, and lets large teams ship independently without dependency lockstep.

🎧 New Señors @ Scale Episode

This week, I sat down with Natalia Venditto and Igor Minar to unpack WebFragments, a radical rethink of how we build for the web.
It’s a conversation about real-world architecture: isolating JavaScript contexts, encapsulating DOMs, streaming server-rendered fragments into client shells, and finally delivering on the promise of micro-frontends that actually scale.


🧩 Main Takeaways

1. WebFragments achieve real independence.
Most micro-frontend architectures fail because they only decouple deployment, not dependencies. WebFragments go further — each fragment owns its runtime, framework, and state. Teams can move at different speeds without shared upgrade pain.

2. “Docker for the browser.”
Each micro-frontend runs inside its own JavaScript container, just like server containers run isolated workloads. WebFragments encapsulate logic and DOM independently but still render within one cohesive document.

3. Smart caching keeps performance high.
Fragments share downloaded assets through the network cache. If multiple fragments use the same React version, it’s fetched once but executed separately — no shared memory, no collisions.

4. Reframing: the hybrid isolation model.
WebFragments use iframes only to spawn new JavaScript contexts. The DOM, however, is rendered in the main document through Shadow DOM.
This gives you:

  • Hard isolation for scripts
  • Visual and CSS encapsulation
  • Accessibility and focus handling that standard iframes can’t provide

5. Fragment Piercing: instant SSR inside SPAs.
Traditional SSR doesn’t help if your client shell takes seconds to bootstrap. “Piercing” streams server-rendered HTML directly into the main document before the shell loads, showing users a live, interactive UI instantly.

6. Built on web standards.
No proprietary runtime. WebFragments rely on existing browser APIs — iframes, Shadow DOM, BroadcastChannel, History, and Location APIs.

7. BroadcastChannel for communication.
Fragments talk to each other via the browser’s native BroadcastChannel API, avoiding custom event buses or global stores. The catalog and cart in the demo communicate this way seamlessly.

8. Middleware removes CORS issues.
All requests originate from a single domain, then a middleware layer routes them to the correct backend — Cloudflare, AWS, Azure, or even a PHP endpoint.
Result: no CORS setup, no origin juggling, total vendor freedom.

9. Bound vs. Unbound Fragments.
Bound fragments update the browser URL (e.g., product detail pages).
Unbound fragments manage local state only (e.g., a shopping cart).
Teams choose per-fragment coupling based on their UX needs.

10. Proven in production at Cloudflare.
WebFragments aren’t just theoretical. Cloudflare is migrating its production dashboard using them — incrementally, page by page — without breaking existing systems.

11. Roadmap and future capabilities.
Next steps include nested fragments, out-of-order streaming, asset-sharing strategies, and a stable 1.0 release.
Performance tests already show near parity with standalone apps.


⚙️ Technical Deep Dive

JavaScript Isolation via Iframes

Browsers lack a direct API to create new JS realms, but iframes provide one.
Each fragment runs in its own iframe, gaining a fresh JS environment, its own global scope, and no shared memory with others.
That means each team can upgrade or change frameworks independently — React, Qwik, Angular, Vue — all running side by side.

DOM Encapsulation via Shadow DOM

The UI doesn’t render inside the iframe. Instead, WebFragments map DOM operations into the main document under a Shadow Root.
This means:

  • Full encapsulation of IDs and CSS
  • No z-index or overflow nightmares
  • No focus or accessibility issues common with nested iframes

“Application runs in the iframe, but DOM operations happen in the main document. We use Shadow DOM to create an isolation boundary for each fragment.”

This combination — iframe logic, Shadow DOM rendering — is called Reframing, and it’s what makes WebFragments possible.

Fragment Piercing: Solving the SPA Blank Screen

Piercing solves one of the oldest frontend problems: the empty white screen before hydration.
Server-rendered fragments stream HTML directly into the live document before the SPA shell exists.
That means users can see and interact with critical UI (like a login form) instantly, while the rest of the app boots in the background.

“We want the initial rendering to be as fast as possible — not just visible, but interactive.”

Cross-Fragment Communication

Instead of a shared global store or event hub, fragments communicate with BroadcastChannel.
Each fragment can publish and subscribe to messages, decoupling communication while staying within native browser APIs.

Routing and State Control

Bound fragments tie navigation to browser history and URLs; unbound fragments remain stateful but internal.
This dual model gives teams granular control over how much their fragment integrates with the global app shell.

Middleware and Single-Origin Architecture

By routing all requests through a single origin, WebFragments eliminate CORS complexity.
A vendor-agnostic middleware inspects incoming requests and forwards them to the right fragment backend — Cloudflare Workers, Azure Containers, AWS Lambdas, or even traditional servers.

Debugging and Tooling

Developers can use standard browser DevTools:

  • Switch between frames to inspect fragment internals.
  • Inspect shadow roots to debug UI boundaries.
  • Neutralized script tags keep React’s virtual DOM indexing stable during hydration.

Production Results

Cloudflare is migrating their main customer dashboard — one of their most business-critical SPAs — to WebFragments.
Migration starts small: one route, one page, one fragment at a time.
Users can’t tell which pages run WebFragments, but the team benefits from faster iteration and smaller failure domains.


💬 Favorite Quotes

“WebFragments, unlike module federation, actually scale.”
“We are fully encapsulating a context of execution for JavaScript, and encapsulating the DOM — yet it’s one single document.”
“Piercing lets you show server-rendered UI before the client shell even exists.”
“We don’t have CORS issues because the entire deployment lives on a single origin.”


🧠 What I Learned

  • The next leap for micro-frontends isn’t better bundling — it’s browser-level virtualization.
  • Real independence comes from isolating both runtime and DOM, not just build pipelines.
  • Server-side rendering can coexist with SPA shells through fragment streaming, not full rewrites.
  • Vendor neutrality and standards-based design are what make WebFragments future-proof.

🎯 Also in this Episode

  • How shared dependencies couple entire orgs to a single release train
  • The evolution of micro-frontends beyond Module Federation
  • Why iframes failed before and how reframing fixes their flaws
  • A preview of nested fragments and out-of-order streaming
  • How enterprise teams can modernize incrementally without rewrites

🎧 Listen Now

🎧 Spotify
📺 YouTube
🍏 Apple Podcasts (coming soon)


Episode Length: 1h 2m of deep technical exploration on the future of frontend architecture.
If you’ve ever hit the limits of module federation or fought shared dependency chaos, this episode will change how you think about composition on the web.

Happy scaling,
Dan

🏆 SOLD OUT IN SINGAPORE · ATHENS · LONDON

From Lizard to Wizard

4-hour remote system design intensive.
Chat apps, microfrontends, BFF, SDUI, event-driven, observability.

€299 4-HOUR INTENSIVE
Save your seat →

Spots are vanishing. Don't be the one who waited.

💡 More Recent Takeaways

React Native at Scale with Kadi Kraman
Episode 35

Señors @ Scale host Neciu Dan sits down with Kadi Kraman, software developer at Expo working on the tools that make React Native development as smooth as possible. Kadi's path started with C++ in a university maths degree, took her through Angular 1, scientific programming for pharmaceutical and defense companies, five and a half years at Formidable, and finally to Expo itself. From the limitations of early React Native to development builds, EAS workflows, fingerprint-based repacks, and the right way to think about over-the-air updates, this is the React Native conversation most web developers never get.

Browser ML at Scale with Nico Martin
Episode 34

Señors @ Scale host Neciu Dan sits down with Nico Martin — open source ML engineer at Hugging Face working on Transformers.js, and Google Developer Expert in AI and web technology — to go deep on running machine learning models directly in the browser. Nico breaks down architectures vs. weights, quantization, tokenizers, ONNX, WebGPU, and why on-device AI is the right answer for a huge class of problems. He also shares the road from ski instructor and self-taught web developer to landing what he calls his dream job at Hugging Face.

Frontend Foundations at Scale with Giorgio Polvara
Episode 33

Señors @ Scale host Neciu Dan sits down with Giorgio Polvara, Staff Engineer at Perk (formerly TravelPerk), who joined when the company was 15 people in two flats with a hole knocked through the wall and helped build the frontend foundations that still hold up at unicorn scale. Giorgio covers the multi-year migration from a monolithic frontend to vertical micro-frontends, why their first attempt with single-spa didn't work, how they pulled off a full rebrand behind feature flags without leaking, and the staff engineer mindset of treating every feature as a system improvement.

Module Federation at Scale with Zack Chapple & Nestor
Episode 32

Señors @ Scale host Neciu Dan sits down with Zack Chapple, CEO and co-founder of Zephyr Cloud, and Nestor, the platform engineer building it, to go deep on module federation, microfrontends, and what it actually takes to go from code to global scale in seconds. They unpack why module federation is Docker for the frontend, how Zephyr composes applications at the edge in 80 milliseconds, and why the real unlock for enterprise teams isn't deployment — it's composition.

📻 Never Miss New Takeaways

Get notified when new episodes drop. Join our community of senior developers learning from real scaling stories.

💬 Share These Takeaways

Share:

Want More Insights Like This?

Subscribe to Señors @ Scale and never miss conversations with senior engineers sharing their scaling stories.