SafeFrame is a web standard developed by IAB

CK CK 3788 
Created at  
506 0 0

The Interactive Advertising Bureau (IAB) created the web standard SafeFrame to improve web users' security and privacy while enabling more secure and controlled interactions with embedded ads. SafeFrame allows advertisers to display their content within a predefined, isolated iframe, providing more control over how ads interact with the host webpage. You should try SafeFrame if you are experiencing some kind of performance issues when your app is combined with video/banner ads - unsafe creatives could cause application vulunerabilities.
 

SafeFrame is a web standard developed by IAB

Here's a basic example of how SafeFrame works:

SafeFrame Container

The publisher's website includes a SafeFrame container in which the ad will be displayed. This container is an iframe element with specific attributes to define the dimensions and other properties.

<iframe id="safeframe" src="https://example.com/safeframe.html" width="300" height="250"></iframe>

 

SafeFrame HTML

The ad creative is loaded inside a SafeFrame HTML page. Typically, the advertiser or an ad network is hosting this HTML page. The SafeFrame HTML page contains the ad's content and instructions for how it should behave.

<!DOCTYPE html>
<html>
<head>
  <title>SafeFrame Ad</title>
</head>
<body>
  <div id="ad-content">
    <!-- Ad content goes here -->
  </div>
   
  <script>
    // SafeFrame API code to handle interactions with the host page
    function adjustSize(width, height) {
      window.parent.postMessage({
        type: 'resize',
        width: width,
        height: height,
      }, '*');
    }
 
    function expand() {
      window.parent.postMessage({
        type: 'expand'
      }, '*');
    }
 
    // Handle other SafeFrame API methods as needed
  </script>
</body>
</html>

 

Interactions

JavaScript functions within the SafeFrame HTML page, like adjustSize and expand in the example, can be used to adjust the size of the SafeFrame container, expand it, or perform other interactions.

 

Communication

The SafeFrame API enables communication between the SafeFrame HTML page and the host page. It uses the postMessage method to send and receive messages.

 

In this example, the SafeFrame API allows the ad to inform the host page about its size or request an expansion. This controlled communication ensures that the ad cannot access or manipulate the host page's content or scripts, enhancing security and privacy.

SafeFrame is especially useful for preventing malicious code or tracking mechanisms in ads from affecting the host webpage. It also provides better control over ad behavior and size, helping to maintain a smooth user experience.

 

 

Tags Display Advertisement IAB Interactive Advertising Bureau SafeFrame Facebook X
Comments 0
Similar posts
  1. Render Ad creatives using setSafeFrameConfig in Google IMA
    1,075
  2. What is VAST? What is VMAP? How VAST/VMAP works?
    894
  3. IAB Categories (a.k.a. OpenRTB Code)
    1,012
  1. Inside the Next-Generation Streaming Architecture: Ultra-Low Latency, SGAI, and AI Codecs
    197
  2. The Next-Gen Low-Latency Standards: LL-HLS & MoQ
    189
  3. From SDI to MXL: Inside the Cloud-Native Infrastructure Powering Next-Gen Live Broadcast
    563
  4. Smooth switching with EXT-X-DISCONTINUITY in HLS
    426
  5. Disabling Audio Tracks in HLS.js
    371
  6. A Deep Dive Into Internet Advertising Ecosystem on Video Streaming Industry
    643
  7. When to use #EXT-X-DISCONTINUITY in HLS?
    1,423
  8. A prefect Apache server settings to avoid CORS error for HLS
    603
  9. CloudFront Settings for Dynamic HLS Streaming
    650
  10. CSAI vs SSAI
    574
  11. Ad Marker: SCTE-35 Message Encoder based in Python
    794
  12. Ad marker: SCTE-35 enhanced
    570
  13. FFmpeg compile options based on configure
    1,110
  14. Script checking internet restriction with FFmpeg
    678
  15. FFmpeg compile option to support SCTE-35
    837
  16. HTTP Proxy when your URL access is blocked with FFmpeg
    1,886
  17. Limit Maximum Resolution in HLS.js
    663
  18. Magic line when HLS video manifest is mixed with encrypted / unencrypted video chunks
    1,452
  19. Recovering a crashed HLS.js player
    1,274
  20. How do I create animated background for Google Meet?
    19,734
  21. Secure HLS encoding using AES-128 encryption with FFmpeg
    1,130
  22. Machine Learning Models for Ad Detection from a Video Stream
    185
  23. Unlock Flawless HLS Audio Sync: The Power of #EXT-X-INDEPENDENT-SEGMENTS
    373
  24. NVIDIA CUDA library which can be integrated with C/C++
    375
Recently updated
  1. Why 100% SEO Guarantees Better User Engagement and How to Achieve It in Your Service
    27
  2. Why SPF and DKIM Are Essential for Linux Email Servers?
    24
  3. How do I create animated background for Google Meet?
    19,734
  4. MaxMind GeoLite2 vs. DB-IP Lite vs. ip-api.com: Choosing the Right Free IP Geolocation Solution
    217
  5. Meet Valkey: Why Redis Changed Its License, Why Valkey is Better, and How to Use It as a Drop-in Replacement
    86
  6. How Rogue Web Scrapers Are Stealing My Content and Destroying My Server
    153
  7. Array of arguments passed to script in PHP
    85
  8. Invalid Auction Storms in Ad Tech
    93
  9. Building MRC-Compliant Instrumentation in Ad Tech: Implementation Steps and Key Challenges
    198
  10. The Two Clocks of Ad Server Architecture
    63
  11. Frequency Cap Architecture Overview
    509
  12. Collecting Proof-of-Play from 100,000 Screens
    141
  13. Vector Search in Relational Databases (RDBs): Trends & Usage Environments
    280
  14. What is RedisVL?
    105
  15. Designing a Skill Registry Architecture: Minimize Token Usage and Maximize AI Performance
    224
  16. TPU & GPU Cluster Management Tools
    234
  17. The Concept of Scaffolding in AI Agents
    222
  18. Beyond Static Pipelines: Architecting LLM Multi-Agent Systems for Autonomous Workflow Orchestration
    576
  19. AI-DLC vs. AI-SDLC: Model-Centric vs. System-Centric AI Development
    253
  20. Fine-Tuning Open-Weight LLMs: Training, Licensing, and Deploying Custom Models with Ollama
    328
  21. Inside the Next-Generation Streaming Architecture: Ultra-Low Latency, SGAI, and AI Codecs
    197
  22. Machine Learning: Training vs. Ranking
    213
  23. The Continuous Learning Machine: Designing a Loop That Actually Turns
    217
  24. The Next-Gen Low-Latency Standards: LL-HLS & MoQ
    189
  25. Designing a Data Curation System Around a Vector Database
    215
  26. Extracting Context from Live Video: The Architecture Got Simpler When We Stopped Building Features
    229
  27. The New Ad Stack Behind Live Sports Streaming: Inside SGAI, EABN, and the Standards Race to Fix Live Monetization
    649
  28. Designing MLOps Architectures to Handle Seasonal Data Drift in EV Fleet Models
    185
  29. From 15 to 40+ FPS: Accelerating PyTorch Object Detection on Automotive ECUs
    207
  30. Understanding Data Lineage
    252