Forum Moderators: Robert Charlton & goodroi
Anyway, I added a top bar on my site to promote my RSS subscriptions. Since it's on top, I don't want that to 'contaminate' my content. So, I added the RSS bar to an external javascript document.write. Below is the code... I was wondering if this will be viewed as cloaking.
document.write('<div style="background: #ffc; border-bottom: 2px solid #fc0; margin: 0 0 5px 0; padding: 4px 0; text-align: center;"><div style="float: left;"><img src="rssicon.png" hspace=5></div><div style="width: 650px; margin: 0 auto;" class="bodytext">Subscribe my RSS via <a href="http://www.bloglines.com/sub/http://www.domain.com/rss.xml">Bloglines</a>, <a href="http://feeds.my.aol.com/add.jsp?url=http%3A/www.domain.com/rss.xml">My AOL</a>, <a href="http://fusion.google.com/add?feedurl=http://www.domain.com/rss.xml">Google</a>, <a href="http://add.my.yahoo.com/rss?url=http://www.domain.com/rss.xml">My Yahoo</a></div></div>');
The content in javascript usually is not indexed and links in it not followed by Googlebot, however there are exceptions. But always you achieve the goal to avoid 'contaminating the content' at the beginning of the page.
The alternative is to put the content at the bottom and use CSS to move it to the beginning of the page, but this makes sense only if you _want_ the content to be indexed, but not at the beginning of the page.
As links hidden in document.write are usually not followed, remember to put them somewhere else on the page (in footer for example) if you want them crawled and followed.
But then, cloaking technique involves flooding keywords to Google spider while hiding them from human visitors.
Putting external javascript, on the other hand, works the other way around by hiding stuff from spider and showing them to humans.