Html IFrame 破坏者文件 - 它们的目的是什么?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1792842/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 01:23:26  来源:igfitidea点击:

IFrame buster files - what's their purpose?

htmliframeads

提问by Alex Yarmula

Looking at a few advertising companies (DoubleClick, Atlas), I've come across the concept of iframe buster files, that are hosted on the same host as the ad publisher (one example: http://www.adopstools.com/ibusters/atlas/atlas_rm.htm, and there's a lot of JS code that works with that page).

查看几家广告公司(DoubleClick、Atlas),我遇到了 iframe buster 文件的概念,该文件与广告发布商托管在同一主机上(一个示例:http: //www.adopstools.com/ibusters /atlas/atlas_rm.htm,并且有很多适用于该页面的 JS 代码)。

I read that they're used to dynamically resize the iframe. Is that all there is to iframe busters? Does hosting them on publisher's host help with JS cross-domain restrictions?

我读到它们用于动态调整 iframe 的大小。这就是 iframe 破坏者的全部内容吗?将它们托管在发布者的主机上是否有助于 JS 跨域限制?

Added: I'm referring to the use case described here: http://blog.operative.com/?tag=iframe, and not just changing the iframe source document to the top level.

补充:我指的是这里描述的用例:http: //blog.operative.com/?tag=iframe ,而不仅仅是将 iframe 源文档更改为顶级。

采纳答案by Tom J Nowell

iframe busters are intended to break a webpage out of an iframe inside another page so that they become the top level page

iframe 破坏者旨在将网页从另一个页面内的 iframe 中分离出来,以便它们成为顶级页面

e.g. if I had an iframe in this answer with your site inside it, the role of an iframe buster on your site would be to bust your site out of my iframe and prevent me from using iframes to show your website

例如,如果我在这个答案中有一个 iframe,其中包含您的网站,那么您网站上的 iframe buster 的作用就是将您的网站从 iframe 中剔除,并阻止我使用 iframe 显示您的网站

This is similar to frame busters, where a website may be encased in a frameset with a second frame up top showing a digg bar or advertisement. In this case, a frame buster would force the browser to display the website and only the website as intended by the author, rather than in a frame with potential advertisement or malware bundled in another frame.

这类似于框架破坏者,其中一个网站可能被包裹在一个框架集中,第二个框架在顶部显示一个挖掘栏或广告。在这种情况下,框架破坏者会强制浏览器显示网站,并且只显示作者想要的网站,而不是在另一个框架中捆绑潜在广告或恶意软件的框架中。

In the provided example, the JavaScript is used to insert a script tag to a second JavaScript file which performs the actual frame busting. The JavaScript used in the html file linked simply obfuscates this process while loading different urls for different advertisements, each with different iframe html to insert.

在提供的示例中,JavaScript 用于将脚本标记插入到执行实际帧破坏的第二个 JavaScript 文件中。链接的 html 文件中使用的 JavaScript 只是混淆了这个过程,同时为不同的广告加载不同的 url,每个 url 都有不同的 iframe html 要插入。

The lengths gone to are likely to be a factor of a cat and mouse chase, as is common with frame busting techniques, where sites have written scripts to bust out of frames, and the companies responsible for framing the sites have written anti-frame busting scripts, so anti-anti-frame busting scripts have been written.

所花费的长度可能是猫捉老鼠的一个因素,这在框架破坏技术中很常见,网站编写脚本来破坏框架,负责构建网站的公司编写了反框架破坏脚本,因此已经编写了反反框架破坏脚本。

回答by nopuck4you

This is done for "take over ads". We use iframes (ADI - iframe vs ADJ - javascript) for a few reasons:

这样做是为了“接管广告”。我们使用 iframes(ADI - iframe vs ADJ - javascript)有几个原因:

1 - they slow down the loading of your page content. 2 - they can break javascript on your page causing your page to stop functioning properly. 3 - worse case: they inject malicious code.

1 - 它们会减慢页面内容的加载速度。2 - 它们可能会破坏您页面上的 javascript,导致您的页面停止正常运行。3 - 更糟糕的情况:他们注入恶意代码。

Using the iframe (ADI) approach the ads are isolated into their own document and can't interfere with the main web page.

使用 iframe (ADI) 方法将广告隔离到它们自己的文档中,并且不会干扰主网页。

However, there are cases when your marketing team wants to run take over ads. They are ads that expand outside their iframe window. For these ads the "iframe busting" approach was setup by most of the top advertising vendors. This approach requires you to host a file on your side that the ads can interact with and by pass the cross-domain restrictions of browsers.

但是,在某些情况下,您的营销团队想要投放接管广告。它们是在 iframe 窗口外展开的广告。对于这些广告,大多数顶级广告供应商都采用了“iframe busting”方法。这种方法要求您在自己这边托管一个文件,广告可以与该文件进行交互并绕过浏览器的跨域限制。

Here is a comprehensive list of these files: http://www.adopstools.com/?section=miscellaneous&page=iframes

以下是这些文件的完整列表:http: //www.adopstools.com/?section=miscellaneous&page=iframes

回答by Eldridge A

Iframe Busters are used to help certain type of rich media creatives perform their full function. FOr example an Expandable rich media will not expand if served into an Iframe without being able to bust out of the Iframe.

iframe Busters 用于帮助某些类型的富媒体广告素材发挥其全部功能。例如,一个可扩展的富媒体如果投放到 Iframe 中而无法从 Iframe 中弹出,则不会扩展。

This is where the Iframe Buster comes into play.

这就是 Iframe Buster 发挥作用的地方。

The purpose of the Iframe buster is to allow the creative to break out of the Publishers Iframes so the creative can be fully functional.

Iframe buster 的目的是让广告素材脱离发布商 Iframe,以便广告素材能够完全发挥作用。

Typically it s a file which needs to be placed in a folder on the sites domain.

通常它需要放置在站点域上的文件夹中的 sa 文件。

So www.yoursitename.com/folder/iframebuster.html

所以 www.yoursitename.com/folder/iframebuster.html

This location will need to be referenced whenever you serve an Expandable ad into the Iframe.

每当您将展开式广告投放到 Iframe 时,都需要引用此位置。

回答by Nitesh Gosalia

What the iFrame Buster does is it allows an expandable banner to come outside of it's Ad Unit dimension. For rg. if you have a 300x250 ad slots and you have an 300x250 ad banner that expands to 300x500 on mouse over or on click then iFrame buster allows it break that 300x250 boundaries and give room to the banner to expand by 300x500.

iFrame Buster 的作用是允许可扩展横幅超出其广告单元维度。对于 rg。如果您有一个 300x250 的广告位,并且您有一个 300x250 的广告横幅,可以在鼠标悬停或点击时扩展到 300x500,那么 iFrame buster 允许它打破 300x250 的界限,并为横幅提供扩展 300x500 的空间。

Doubleclick iFrame buster us generally required if you have a Rich Media Creative like a Pushdown, PubBar or Expandable being hosted and served/setup in DART Studio.

如果您在 DART Studio 中托管和提供/设置富媒体广告素材(例如下推式广告、PubBar 或可扩展广告素材),则通常需要双击 iFrame 破坏我们。

Atlas has their own iframe buster code, MediaMind has addineyev2.html and similarly FlashTalking and other have theirs which are required to be hosted on the server where the ads are going to run.

Atlas 有他们自己的 iframe buster 代码,MediaMind 有 addineyev2.html,类似的 FlashTalking 和其他有他们的代码,这些代码需要托管在将运行广告的服务器上。