943,969 Members | Top Members by Rank

Ad:
Apr 4th, 2006
0

IFRAME or JavaScript?

Expand Post »
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.
Similar Threads
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
Apr 4th, 2006
0

Re: IFRAME or JavaScript?

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.
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004
Apr 4th, 2006
0

Re: IFRAME or JavaScript?

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.
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
Apr 4th, 2006
0

Re: IFRAME or JavaScript?

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?
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004
Apr 4th, 2006
0

Re: IFRAME or JavaScript?

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!
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
Apr 4th, 2006
0

Re: IFRAME or JavaScript?

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.
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004
Apr 4th, 2006
0

Re: IFRAME or JavaScript?

It's similar to AdSense ... AdSense uses document.write as well AFAIK.
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Advertising Sales Strategies Forum Timeline: Banners for branding
Next Thread in Advertising Sales Strategies Forum Timeline: Google link bar





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC