Monday, 15 July 2013

Difference between Iframe and Jscript Tags

Iframe Vs Jscript Tags

Iframe and JavaScript are the most used third party tags or at times the combination of both the tags are also there , just like the DART Iframe tags , you will find iframe , javascript and also standard tag in combination.
The combination is formed because not all browsers recognize the Iframe HTML element.And if the browser doesn’t support Iframe it will render the jscript tag and if the browser does not support javascript(which is very rare) it can always use the standard tag.
But the question is what is the difference between an Iframe tag and a JavaScript tag.To explain the difference let’s know them first..
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. 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 an 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 web advertising solutions are based on iframes.
  • If contents to be loaded first and than Ads , it can be done using Iframe.
  • Iframe helps in improving performance.
  • Iframe loads independently from other components on the page.
  • If a user has javascript disabled, iframes will work.
  • 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.
Example of a Iframe tag (eye blaster) :

<iframe src=”http://bs.serving-sys.com/BurstingPipe/adServer.bs?cn=rsb&c=28&pli=xxxxxxx&PluID=0&w=336&h=280&ord=[timestamp]&ifrm=2″ width=336 height=280 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no bordercolor=”#000000″></iframe>
JAVASCRIPT TAGS :
These tags are encoded within script and tells the browser to read as JavaScript the content retrieved from the source (SRC) location. JavaScript tags are useful for sites that already use their own Iframes for complex page layouts, or for publishers who would prefer not to use Iframes.
Tha JavaScript tags are embedded directly into the HTML document so if any site layout or ad delivery requirement demands embedding of ad code directly into HTML doc , javascript tag is used and not Iframe tags.If we have to serve expandable Ads we cannot use Iframe but javaScript only.
Advantage of JavaScript tags :
  • Majority of browsers supports Jscript.
  • Javascript tags help in serving any expandable banners.
  • 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.
  • An iframe can only be rendered into a single place but javascript do not have such rule.
  • It is supported by almost all handhelds.
  • No accessibility issue.
Disadvantage of JAVASCRIPT TAGS :
  • If the Javascript is disabled by the user , it will serve only the standard banner and not flash content.
  • They are not loaded independently of the content in a webpage
Example of a JavaScript tag (double click tag) :
<SCRIPT language=’JavaScript1.1′ SRC=”http://ad.doubleclick.net/adj/Nxxxx.xxxxxx/Bxxxxxx.x;sz=300×250;ord=[timestamp]?”></SCRIPT><NOSCRIPT><A HREF=”http://ad.doubleclick.net/jump/Nxxxx.xxxxxx/Bxxxxxx.x;sz=300×250;ord=[timestamp]?”><IMG SRC=”http://ad.doubleclick.net/ad/Nxxxx.xxxxxx/Bxxxxxx.x;sz=300×250;ord=[timestamp]?” BORDER=0 WIDTH=300 HEIGHT=250 ALT=”Advertisement”></A></NOSCRIPT>

No comments:

Post a Comment

Change to AdWords Enhanced CPC removes bid cap to account for location & audience

  AdWords users will notice a new alert in their accounts notifying them of changes to Enhanced CPC bidding.  The notice...