SOC for sure! I've been using this method for years and it performs without fail. I typically drop all content such as AdSense at the bottom of the html. I learned years ago that SOC improves the user experience and also makes for a nice clean indexing. ;)
Thought about using SOC some time ago, but I have an old website with too many pages that would need changing.
Not sure there is a way to get around that... especially when there may be intermittent Google pauses.
Yeah I figured that may be the best/only way, I'm just source ordering content and nav already and I'm not sure that I can squeeze everything else in, in the places that I need it.
I have one set of adsense underneath the nav bar which is source-ordered at the foot of the page (so no problem), but I also have AS inserted into forum threads, which are table based.
Is there any way that I can have the forum AS code at the foot of the page, but shove it into a DIV inside a table residing above it? Consider if my post here had AdSense just below it.
I can't think of any way to do that and keep the liquid layout.
Perhaps I should move this thread into the CSS forum....
There was a time when IFrames solved this problem, but when Adsense introduced the "section" start and end directives (section targeting), they made IFrames unreliable. It is likely you will have untargeted ads if you try IFrames. (For some, IFrames still seem to work, I don't understand why.)
It's funny when IFrames did work you would get targetted ads even in the Google cache, and the performance problems were solved.
For some sites I now have the Adsense code at the end of the page and use a DIV to place the ads where I want them. This leads to an interesting appearance (corrupted) for pages in the Google cache.
I've always wondered whether a "link rel" directive might expedite loading this code?
|With SOC, you need not worry about it as it is the last thing on the page that loads. |
I'll change a dozen or so pages and check it out.
|This leads to an interesting appearance (corrupted) for pages in the Google cache |
I've disabled Google's caching my pages a month back, was scary in the beginning but all is well with no repercussions so far.
are you using DHTML method?
|are you using DHTML method? |
No. I've never had the opportunity or need to work with DHTML.
My AdSense code sits right before the closing </body> tag. Right where it should be. ;)
Anyone remember back to the WPG days and their tracking script? There were times when that thing would hang for minutes.
|My AdSense code sits right before the closing </body> tag. Right where it should be. |
I use section targeting to tell adsense to only look at the main body and not the navigation. I put the adsense code inside of the section targeting. Has anyone tried putting the adsense code outside of the section targeting and were there any negative side effects?
> 1. Source ordered content
OK. Stupid Question.
I run Adsense on the left side navigation bar. As such, when Adsense died the other day, none of my content showed.
So...how can I move that adsense code down to the bottom, without messing up the page layout?
If google would only let us change the code and use "DEFER" we could fix all page loading time issues in a heartbeat.
Source Ordered Content - basic SEO tactic employed as a means of putting important content at the top of the page source, less important content/fluff at the bottom of the page source, and using CSS to direct DIV positioning to the browser.
As we're in the AdSense forum I don't propose to go into great detail on the CSS side of this. That's essentially the gist of it. There's a few threads in the CSS forum library.
|I run Adsense on the left side navigation bar. As such, when Adsense died the other day, none of my content showed. |
You could put the entire nav bar and AdSense code at the very bottom of the page source as pageoneresults and put it in a DIV to ensure it renders in the right place.
I'm still convinced there's a better way. I'm already doing SOC for 3 col fluid source-ordered layouts and I'm convinced that I can't introduce the JS script calls in the right place without breaking what I have already in one browser or the other.
|right before the closing </body> tag. Right where it should be. |
Amen brother ;)
Can't you ask google if a modification is ok? Or do they just give you a cookie-cutter run-around?
It looks like I will be outvoted on this one, but I've been using Iframes with very good results. If AdSense (or other network) is delayed or unavailable, my pages still load well. The ads also are matched well to the content. (I haven't tried the section start/end directives.)
Testing the Iframe solution is pretty easy. Copy one of your pages, but put the AdSense code in a page in an Iframe a few pixels larger than the ad unit. Load your page from a browser. Google usually fetches that page from the server immediately, and you will soon see relevant ads. At least that is how it works for me...
|If google would only let us change the code and use "DEFER" we could fix all page loading time issues in a heartbeat. |
I wish Adsense would do something like that in their code rather leave it to webmasters to each work out some sort of fix. It really is a concern especially for those of us who still have visitors using dial-up.
|Source Ordered Content - basic SEO tactic employed |
Just FTR, this is also a tactic that can improve accessability, not just SEO :)
I have a question. The users who are experiencing the slow page load, are they by any chance using IE?
My AdSense code is in a fixed-size div at the beginning of the page source, close to the opening body tag. Now, whenever I view my site in FireFox, the page loads very fast hanks to an highly optimized site on a dedicated server. It might take a while until the adsense JS code fetches the ads, though. Until that's done the ad div is empty. But it never delays the loading of the page. Why would it? The div is of a fixed size and so the browser can go ahead and lay the page out even though the div's content is not yet known. The AdSense JS runs asynchronously to the page loading, right?
I seem to think this is another IE quirk.
This is an interesting Adsense topic. Rebelde and I have discussed IFrames before and have different results. One difference, perhaps, for my lack of success, was having the Adsense code before the page content; this was not a problem when I first used IFrames, but they did stop functioning well for me. Now that I've relocated the code beyond the content, and in doing this wrapped the pertinent content with section start and end directives, conceivably I could again use an IFrame to assure completely asynchronous loading of the Adsense Ads. I'm not sure the DIV always does it.
|I'm still convinced there's a better way. I'm already doing SOC for 3 col fluid source-ordered layouts and I'm convinced that I can't introduce the JS script calls in the right place without breaking what I have already in one browser or the other. |
I'm convinced you can dynamically locate the code. One method is to put Named Marker dummy scripts throughout your page everywhere you might like the code to execute. Then the code can be dynamically attached (inserted) after the appropriate dummy script markers.
BHTSCRelements = document.getElementsByTagName("Script");
for (var i = 0; i < BHTSCRelements.length; i++)
if(BHTSCRelements[i].id == "BHTDS-BHTUL5L")
var BHTSCRelementDis1 = BHTSCRelements[i+1];
var BHTSCRelementDis2 = BHTSCRelements[i+2];
if( BHTSCRelementDis2 )
The code above dynamically detaches the Adsense code script that follows a dummy script called BHTDS-BHTUL5L. "BHTSCRelementDis2" points to the one block of Adsense code. If these dummy scripts were sprinkled around your pages whereever you might need ads, conceivably you could dynamically "reattach" the code to execute whereever you want it too on the page. I've used this code to dynamically disable more than one Adsense ad on a page. This allows me to achieve this goal without altering Adsense code at all! (I haven't done extensive testing however).
This discussion is very pertinent to the Adsense topic, since it is the Adsense code, performance, and TOS that mandate elaborate coding schemes.
Regarding dynamic code execution in my last post, I've had second thoughts. The goal was to dynamically locate the code not execute it, which my comments don't really help with. (It was too late to edit)
to get good revenue it should be placed towards the starting. I do not know how optimize will be a css based desiging where the code keeps it towards the bottom. I will certianly not go for iframes.
I find adsense's loading speed ok.
Not the total page load time is important.
The load time to first useable content.
So the main content of my sites comes first.
After this comes the navigation.
For load times very important is to use only static pages. All pages are generated by my CMS on my computer and uploaded as static pages.
I'd like to try the SOC route with the adsense code at the bottom. But I'm a complete numpty with CSS. Can anyone post any url's to help us people who haven't yet explored this area?
|Not the total page load time is important. |
The load time to first useable content.
That depends on the design of the site and existing markup.
|For load times very important is to use only static pages. |
That is not correct - it makes absolutely no difference to AdSense load times whether your pages are static or dynamic. The moment the AdSense JS file is executed the page load will stall waiting on Google, not your server.
David - for the CSS side of this, and SOC, start in the CSS forum library.
Nice suggestions,i have received such a complaints from users in past as well as i have catched it myself