3 ms·
Most ad code does run in iframes and the industry standard is to use "friendly iframes" which offer security but also access to the parent window. And even if y
by manigandham 9y ago
Most ad code does run in iframes and the industry standard is to use "friendly iframes" which offer security but also access to the parent window. And even if you use iframes, something has to create that iframe initially and publisher devs are not going to do that manually, which is why there are top level script tags. All tag managers and adservers today default to using iframes for 3rd party tags.
- Animats 9y agoGoogle AdSense FAQ: Q: Is it violating program policy if I place ads on iframe webpages in my software? A: Yes, it does violate our policies. Firstly, you’re not allowed to place ads in a frame within another page. Exceptions to our policies are permitted only with authorization from Google for the valid use of iframes.[1] [1] https://support.google.com/adsense/answer/3394713?hl=en https://support.google.com/adsense/answer/3394713?hl=en
- manigandham 9y agoThat's different. Yes, their policy is that you cannot have a page of your site that you load in an iframe, then put ads into that child page. This is to prevent fraud and viewability issues like loading 100 invisible child pages in the background to rip off ad networks. None of that has to do with how ads from their network are actually rendered when you use their tags. Adsense/DFP tags do use iframes for almost everything unless explicitly set to load directly on page, usually for legacy code or rich-media. The relevant help article is here: https://support.google.com/dfp_premium/answer/183282 https://support.google.com/dfp_premium/answer/183282 "...SafeFrame is supported in DFP and enabled by default when using Google Publisher Tags. Reservations serve into SafeFrames by default, but you can disable this setting...and use friendly iframes instead, if needed.... Some creatives, such as expandable ads or creatives that access your page’s DOM elements, might not render correctly in SafeFrames or other cross-domain iframes. We recommend updating these creatives to make them SafeFrame-compatible, in order to retain SafeFrame’s security benefits. If this is absolutely not an option, there are a few things you can do to allow reservation ads of this type to render properly..."
- lamlam 9y agoTo add to this, there's also a slow transition towards safe frames [1] that allows for better protection than friendly frames by restricting all page-iframe communication to a specific API. [1] https://www.iab.com/guidelines/safeframe/ https://www.iab.com/guidelines/safeframe/
- Animats 9y agoBy "friendly iframes", the ad industry means "doesn't get in the way of ad code doing anything it wants to." "Unfriendly iframes" keep ad code in its own sandbox and its own screen real estate.
- manigandham 9y agoSure, the latest standard now is called SafeFrame which adds the necessary security: https://www.iab.com/guidelines/safeframe/ https://www.iab.com/guidelines/safeframe/ Either way, iframes are common and the ad industry is not the issue here. Many analytics providers that track all events automatically do need window access and the normal install for all of them is tag on site.