可扩展广告的iframe拦截器如何工作? [英] How do iframe busters for expandable ads work?

查看:117
本文介绍了可扩展广告的iframe拦截器如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些关于展开式广告的问题,< iframe> s。我制作了展开式广告,这些广告将显示在< iframe> s中。这些广告将由已知的广告服务商提供,例如doubleclick,smartadserver,eyewonder等。

感谢关于堆栈溢出的一些问题,我发现他们有一些方法可以将广告从< iframe> s或者甚至动态调整< iframe> s的大小。



ve found < iframe> buster文件,但我真的不知道它们是如何工作的。



我知道我必须创建一个我将与广告标记一起提供给发布商的HTML文件,他们需要将其放在其域名下。但我不明白这个文件是如何工作的。如何与我的JS进行交互?

解决方案

HTML文件允许广告供应商在域中加载自己的JavaScript托管HTML文件。通常,这是一个3步骤的过程。


  1. 广告服务器域(ads.adserver.com)上的iframe中的广告加载与网站域名(www.example.com)。

  2. 广告在这样的iframe中检测到它,并将另一个iframe加载到www.example.com上的HTML文件中,并将参数传递给HTML文件

  3. 然后HTML文件加载到广告中(首先查找广告加载的iframe以确定位置),并将其放置在可访问的父网站DOM结构中认为它是同一个域名。


I have some questions about expandable ads and <iframe>s. I've created expandable ads which will displayed in <iframe>s. These ads will be served by known adservers like doubleclick, smartadserver, eyewonder, etc.

Thanks to some questions on Stack Overflow, I've discovered that they are some ways to break the ads out of the <iframe>s or even to dynamically resize the <iframe>s.

I've found <iframe> buster files from the main ad serving company on the Internet, but I don't really get how they work.

I know that I have to create a HTML file which I'll be giving along with my ad tag to the publisher, and they'll need to put it under their domain. But I don't understand how that file works. How do I interact with it from my JS?

解决方案

The HTML file allows the ad vendor to load their own javascript on the domain of the hosting HTML file. Normally, its a 3 step process.

  1. Ad loads within an iframe on an ad server domain (ads.adserver.com) versus the site domain (www.example.com).
  2. Ad detects its in such an iframe and loads in yet another iframe to an HTML file on www.example.com, passing in parameters to the HTML file
  3. HTML file then in turns loads in the ad (first finding the iframe the ad was loading in to determine location) and places it on the parent website DOM structure, which it has access to thinks to the fact that its the same domain.

这篇关于可扩展广告的iframe拦截器如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆