Fenced Frames

« Back to Glossary Index

Definition: Fenced Frames is a web platform API proposed as part of Google’s Privacy Sandbox initiative that renders embedded content — typically ads — in a restricted, isolated browsing context. Unlike standard iframes, a fenced frame cannot communicate with or access data from the embedding page, and the embedding page cannot inspect the fenced frame’s content or URL. This isolation is designed to enable ad rendering without cross-site data leakage.

Why It Matters: In the post-third-party-cookie web, ad selection APIs like Protected Audiences need a way to display a chosen ad without revealing which interest group triggered the selection — since that information could be used to reconstruct user profiles. Fenced Frames provide the isolated rendering context that makes this possible. For ad tech and programmatic advertising professionals, understanding Fenced Frames is increasingly relevant as Privacy Sandbox APIs move toward broader adoption and the industry adapts to privacy-preserving advertising infrastructure.

How It Works: A fenced frame is created using the HTML element. It loads content via an opaque URL — an obfuscated reference that the embedding page cannot read — which points to the ad creative selected by a Privacy Sandbox API. The browser enforces strict communication boundaries: the fenced frame has no access to the parent page’s DOM, cookies, or storage, and the parent page cannot read any data from within the fenced frame. Network requests from within the fenced frame may also be restricted to prevent timing-based data exfiltration.

Related: Protected Audiences API, Topics API, Cookieless Tracking, Privacy Sandbox, Programmatic Advertising

Synonyms:
Fenced-Frames, Fenced Frame