可扩展广告的 iframe 破坏者如何工作?

发布于 2024-10-30 16:10:05 字数 677 浏览 0 评论 0 原文

我对展开式广告和

感谢一些关于 Stack Overflow 的问题,我发现它们是一些将广告从

我找到了

我知道我必须创建一个 HTML 文件,并将其与我的广告代码一起提供给发布商,并且他们需要将其放在其域下。但我不明白该文件是如何工作的。我如何通过 JS 与其交互?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

-小熊_ 2024-11-06 16:10:05

HTML 文件允许广告供应商在托管 HTML 文件的域上加载他们自己的 JavaScript。通常,其过程分为 3 个步骤。

  1. 广告在广告服务器域 (ads.adserver.com) 与网站域 (www.example.com) 上的 iframe 内加载。
  2. 广告在这样的 iframe 中检测到它,并将另一个 iframe 加载到 www.example.com 上的 HTML 文件中,将参数传递给 HTML 文件
  3. HTML 文件,然后依次加载到广告中(首先找到广告加载的 iframe)确定位置)并将其放置在父网站 DOM 结构上,由于它是相同的域,因此它可以访问该结构。

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 thanks to the fact that it is the same domain.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文