IFRAME TAG :
The “I” in Iframe is Inline and the Iframe element is used to define an inline frame for the inclusion of external objects including other HTML documents. An iframe is somewhat same as an object (“an object element is used to include objects such as images, audio, videos, Java applets, and Flash animations“) as it provides the same functionality as an object .
An Iframe tag is the one which allows an HTML page to be embedded in another HTML page.As the browser finds the iframe keyword it understands and searches for the source from where to find the HTML page to load into the Iframe.. i.e for example in a DART Iframe tag :
<IFRAME SRC=”http://ad.doubleclick.net/adi/Nxxxx.xxxxxx/Bxxxxxx.y;sz=300×250;ord=[timestamp]?” WIDTH=300 HEIGHT=250 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR=’#000000′>
http://ad.doubleclick.net/adi/Nxxxx.xxxxxx/Bxxxxxx.y;sz=300×250;ord=[timestamp]? is the source from where the browser will get the HTML page which is actually the Ad that will appear on the webpage (in case of online advertising).
WIDTH=300 HEIGHT=250 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR=’#000000′ is the dimension or box defined for the frame where the tag will load , the size defined of a frame in the above code is 300×250 , this defines the Ad won’t go beyond this frame size and thus we don’t upload any expandable tag under Iframe as when it expands it will open under the frame only .
Advantages of IFRAME TAGS :
- The browser allocates some space for an inline frame beforehand and takes this into account when rendering the document.
- Iframes implement the cross domain origin policy which can be useful for pulling in sites / content/Ad from other domain names and they are also relatively safe and that is why most of the web advertising solutions are based on iframes.
- If contents to be loaded first and then Ads , it can be done using Iframe.
- Iframe helps in improving performance.
- Iframe loads independently from other components on the page.
- An iframe tag has attributes “height” and “width,” which allows the designer great latitude with dimensions and format like 300×250 , 728×90 depending on the Ad size.
- Iframe tag can appear anywhere on the page and several iframes can be added if wished to.
Disadvantage of IFRAME TAGS :
- It causes accessibility problems.
- It is not supported by all the browsers and can display them improperly or even can serve blank.
- The main reason for using in web advertisement is security in cross domain support but performance is not perfect.
- Iframes can not be seen by many handhelds.
- It lowers your SEO score at times.
- The majority of browsers supports Jscript.
- Multiple ad sizes can be served using same serving code at same place ,(e.g. 468×60 and 728×90)
- It puts less load on the server to load.
- It is supported by almost all handhelds.
- No accessibility issue.
- They are not loaded independently of the content in a webpage