By Federico Liccione, Head of Ad Delivery
Ever wondered why an ad looks perfect on your laptop but breaks inside an app? Behind every flawless impression lies a hidden battle: making ads render consistently across countless browsers and devices. Here’s why this matters—and how we tackle it.
The Invisible Challenge
Cross-browser and cross-device fragmentation is one of the hardest problems in programmatic advertising—and most people never see it. Ads don’t just need to load; they need to render perfectly across hundreds of combinations of browsers, operating systems, and in-app environments. Every inconsistency can break the user experience, waste advertiser spend, and damage publisher trust.
At Onetag, we’ve been deeply involved in this industry for years. That experience has taught us just how many things can go wrong—and how many workarounds are needed to keep ads rendering correctly.
Why Programmatic Is Especially Exposed
Programmatic advertising thrives on precision and scale. But the more environments you support, the more complexity you face. A single creative might look perfect in Chrome on desktop but break in a WebView inside an app. These inconsistencies aren’t just cosmetic—they impact performance, ROI, and user trust.
A Brief Historical Note: The Browser Wars
Back in the late ’90s and early 2000s, competition between browsers sparked an innovation race that often ignored compatibility. Vendors introduced proprietary features, creating a fractured landscape. The need for standardization led to ECMAScript, the official specification behind JavaScript, which aimed to unify scripting behavior across browsers. While ECMAScript brought consistency to core language features, differences in implementation still persist—especially in how browsers handle HTML and CSS attributes.
One Feature ≠ One Implementation
Take the marginwidth and marginheight attributes on iframes. In theory, these should control the margins inside an iframe. But in practice, Firefox ignores these attributes on “unfriendly” iframes (those loaded from a different origin) for security reasons. Why? Because applying these attributes could allow cross-origin communication through layout manipulation—a potential attack vector.
As explained in Securitum’s analysis1, this behavior prevents style changes from leaking sensitive information. Thanks to extensive testing across browsers and devices, we were able to spot this issue and implement a workaround—just one example of how a single feature can lead to multiple, conflicting implementations across browsers.
Ad displayed in Chrome inside a cross-origin iframe — margins removed as expected.
Ad displayed in Firefox inside a cross-origin iframe — default 8px margin persists due to security restrictions.
Security-Driven Limitations
Security is critical, but it often adds complexity. Some APIs are silently unavailable in certain contexts, with no clear documentation. The postMessage restriction inside SafeFrame2—the IAB’s sandboxing technology for isolating third-party creatives—is a prime example: it can prevent HTML5 creatives from communicating properly, creating issues that are hard to diagnose.
The Testing Paradox
To manage this fragmented ecosystem, we rely on automated testing. But here’s the paradox: tests themselves can run into the same inconsistencies we’re trying to detect. A test that passes on Chrome might fail on Safari—not because of a bug in the code, but due to implementation differences.
The BiDi (bidirectional) protocol is a step forward toward consistency, but the journey is far from over.
BiDi—short for WebDriver BiDi—is a new browser automation standard that enables two-way communication between test scripts and the browser. Unlike the old one-way WebDriver model, BiDi allows tests to send commands and receive real-time events, making automation more reliable and reducing flaky behavior across different browsers. Its goal is simple: unify automation and improve consistency in a fragmented landscape.
How We Deal With These Difficulties
We’ve built robust automated testing pipelines using tools like BrowserStack to cover a wide range of real browsers and devices. We balance speed and coverage, and where possible, we adopt protocols like BiDi to reduce inconsistencies. On top of that, we maintain custom test apps for Android and iOS to debug ads in real in-app environments. This level of control means we can catch issues others miss—and fix them fast.
The App World: An Extra Layer of Fragmentation
If the web is challenging, apps are even more so. In-app browsers (WebViews) multiply rendering contexts, often introducing custom code that pollutes the environment. Debugging is harder because many variables are uncontrollable. Vendor-specific quirks add another layer, for example:
- Font boosting on Android can break banner creatives visually in apps, even when Google’s web preview looks fine.
- Inline video on iOS apps requires specific app-level configurations to comply with platform policies.
Our Strategic Advantage
This isn’t just about fixing technical problems—it’s a competitive edge. Our experience in the industry means we know the pain points. We’ve built systems that track dozens of variables during ad rendering, far more than most, because we want ads to deliver the right way. Our automated pipelines, custom apps, and innovative protocols enable us to deliver high-quality ads faster and more reliably.
Looking Ahead
The next frontier? AI-driven testing. It’s our clear direction: automatically generating test suites, enabling true test-driven development (TDD), and introducing visual test automation for pixel-perfect rendering. Emerging tools from platforms like BrowserStack point the way forward. AI won’t replace our expertise—it will amplify it, helping us scale quality without compromise.
Making the hardest problem you don’t see visible—and solvable—is how we shape the future of programmatic advertising.
Resources:
1 https://www.securitum.com/marginwidth-marginheight-the-unexpected-cross-origin-communication-channel.html
2 https://github.com/InteractiveAdvertisingBureau/safeframe/issues/9
Originally Published on: LinkedIn