What Tag are You?
As part of what will be our ongoing series on The Anatomy of an Ad Tag, this post will offer a brief discussion of the key ‘pros and cons’ of two different ad tag types. Iframe or JavaScript ad tags? You decide…
When tagging up a website with ad tags there are two main types which can deliver rich content, they are Iframe or JavaScript ad tags, but which one should you choose? In this post, we’ll take a minute to talk about the differences between the two, let’s kick off with Iframe tags.
Iframe Tags
An Iframe is simply a tag that defines an inline frame that contains another document. It is supported by all major browsers. With Iframes you can define the width and height of the document loaded into the frame and choose to have a border and define the border color. Iframes can serve most rich content but will have to have an Iframe buster file implemented to serve expandable creatives from a third party rich media vendor.
Iframe pros:
- Although Iframe tags are in the page html, their content is loaded separately to the page so page load times may be slightly quicker than pages using JavaScript Tags.
Iframe cons:
- There can be larger counting discrepancies with Iframe tags.
- To serve expanding creatives, an Iframe buster file will need to be implemented by the publisher for each rich media vendor used. This is due to the nature of an Iframe being a fixed width and height.
JavaScript Tags
A JavaScript tag is the best tag for serving rich content because of its flexibility. JavaScript is also supported by all major browsers. JavaScript ad tags pull external content using the src variable.
JavaScript pros:
- Can serve all rich media content.
- Counting discrepancies can be less than Iframe tags.
JavaScript cons:
- Can affect page load times as the browser will wait for the JavaScript content to load before continuing to render the page.
- The tag will not show if the user has JavaScript disabled in their browser.
In conclusion, while both Iframe and JavaScript tags have their merits, it is our recommendation that you use JavaScript ad tags for serving ads because of their flexibility and ability to serve all rich media content now and in the future. Iframe tags are only typically recommended for complex web pages where JavaScript is proven unsuitable such as refreshing elements in the same page.
What tag is your organization? Why? We’d really like to hear your opinions and experience on this subject. Until next time, happy tagging!



Thanks for the blog post. Agree 100%. However, could you elaborate more what issues affect the different level of counting discrepancies between iFrame tags and Javascript tags?
Thanks for the great post!
I have a question. Seems like all the major ad networks implemented the buster file. I see huge amounts of JS code for those buster files. Is that only to resize the iframe, or do they try to write the creative outside of iframe? In other words, could you please tell more about iframe busters?
Hello,
We have counting problems and we are using IFrame in our serving system.
Why Ifreme counts near 5x less impressions and clicks comparing to media in-house banner administration systems?