IFRAME or JavaScript?

Please support our Advertising Sales Strategies advertiser: Get a Free Online Advertising Analysis!
Reply

Join Date: Feb 2002
Posts: 12,038
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 129
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

IFRAME or JavaScript?

 
0
  #1
Apr 4th, 2006
When using a third party ad server, do you use the IFRAME or JavaScript method? Usually the JS method is more robust and offers more features, but it can slow down page rendering times. Currently struggling with this battle right now.
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/daniweb
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 1,655
Reputation: tgreer is an unknown quantity at this point 
Solved Threads: 35
Team Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: IFRAME or JavaScript?

 
0
  #2
Apr 4th, 2006
JavaScript. I'd think interpreting/running a script wouldn't be that much slower than loading an entire IFRAME. Plus, IFRAMES... I just never cared for frames.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,038
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 129
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: IFRAME or JavaScript?

 
0
  #3
Apr 4th, 2006
Well with JavaScript, it is loaded inline with the rest of the site. So lets say you have a banner near the top of the page. If the ad server is slow, the rest of your site gets delayed in being rendered. Even worse, if the server is having a problem connecting, your site will just show whitespace and never finish loading below the ad placement. On the other hand, with IFRAMES, your entire site gets loaded first, and then the ads.
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/daniweb
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 1,655
Reputation: tgreer is an unknown quantity at this point 
Solved Threads: 35
Team Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: IFRAME or JavaScript?

 
0
  #4
Apr 4th, 2006
But JavaScript doesn't have to be loaded first. It could just as easily be the LAST thing you run on the page. Also, you can code it as a separate request via AJAX/XMLHTTPRequest.

What do Frames/Iframes do to SEO?
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,038
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 129
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: IFRAME or JavaScript?

 
0
  #5
Apr 4th, 2006
This whole conversation is completely SEO-irrelevant because they're ads ... either way you're making a call to an ad server. Well that's my question ... how can I make the JavaScript the last thing I run on the page, when it includes document.write() statements? For example, take the Google AdSense code ... you put it wherever you want AdSense to appear. What if that is near the top of the page? If Google's server is lagging, the rest of your site doesn't get loaded.

How can I use AJAX? No experience there. But interested!
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/daniweb
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 1,655
Reputation: tgreer is an unknown quantity at this point 
Solved Threads: 35
Team Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: IFRAME or JavaScript?

 
0
  #6
Apr 4th, 2006
You shouldn't be using code that contains document.write() statements. That's deprecated and may or may not work based upon doctype.

I haven't looked at Google Adsense code since... nevermind. Awhile. And since it's being provided, you might be break all sorts of rules if you modified it.

In general, you'd have a div where you wanted the ad. You'd have a script to retrieve the ad image/link code. You'd place that script at the very bottom of your page. Then you'd have a script after that, which alters the content of the div, placing the ad within it.

If their code uses document.write(), though, that approach wouldn't work.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,038
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 129
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: IFRAME or JavaScript?

 
0
  #7
Apr 4th, 2006
It's similar to AdSense ... AdSense uses document.write as well AFAIK.
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/daniweb
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Advertising Sales Strategies Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC