Forum Moderators: martinibuster

Message Too Old, No Replies

Ads covered by content on Google cached pages

Concerned about TOS and a good solution

         

rubenski

6:27 pm on Dec 5, 2004 (gmt 0)

10+ Year Member



Hi everyone,

I use DIVs and a style sheet for the layout of my pages. I use 3 absolutely positioned DIVs. The top horizontal DIV contains an Adsense leaderboard.

In Google's cache the two DIVs that usually sit below the leaderbord DIV are now covering it! The absolute positioning is broken because of the header that Google displays on all cached pages.

The HTML and CSS I wrote is completely W3C compliant, yet I think it's against their TOS that Adsense ads are covered in Google's cache. What's your opinion on this? Any suggestions as to how I would uncover the Adsense ads?

Jenstar

1:42 am on Dec 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you checked with Mozilla, Opera and Netscape? Is there an issue in any of those browsers with the ads being covered by content? If not, I wouldn't worry about it.

rubenski

11:38 am on Dec 6, 2004 (gmt 0)

10+ Year Member



Hi Jen. The error occurs for sure in Firefox 1.0 and IE6. I haven't tested other browsers yet.

I have implemented a possible solution, but I'll need to do some more testing to be sure.

I wonder if I should inform Google. I am not to eager to contact Google, because I am actually violating their TOS. On the other hand, my pages are W3C compliant, and the issue is actually caused by the way Google cached pages are displayed.

Anyway. The next cache run will eliminate the problem since I moved the ads to the bottom of the page, just to be sure.

bumpski

2:49 pm on Dec 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



For a long time Adsense ads only showed public service or alternative ads in Google's cache. Now they seem to advertise Google itself quite a bit, regardless of content ( is this quality? ).

You really don't have control over how Google shows your page in it's cache so I don't think you should be worried at all about TOS violations.

In acutality Google is infringing upon your Copyright, but I'm sure you probably implicitly approve of Google's cache. You could always disable Google's caching of your site using robots.txt or the meta tag NO cache. Of course Google could implement the YES cache option and get rid of their Copyright problem. I'm sure that might upset some Webmasters too.

Birdman

3:03 pm on Dec 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



One solution is to use a server-side script to check the referrer and serve a different stylesheet.

PHP Example:

<?
if (str_pos('search?q=cache:', $_SERVER['HTTP_REFERER'])){
$stylesheet = 'no_abs_positioning.css';
} else {
$stylesheet = 'abs_positioning.css';
}
?>
<head>
<link type="text/css" rel="stylesheet" href="<?=$stylesheet?>">

rubenski

11:47 am on Dec 7, 2004 (gmt 0)

10+ Year Member



Birdman,

I don't think that would work. The page is at Google's side. When a user requests a cached page no request is made to the actual page on my site. The page is stored at Google.

Thanks anyway for posting. I think I have come up with a solution. I noticed the top part containing the Adsense code is actually not a DIV. I have changed this into a div and added a high Z-Index to it. I'll let you know how it works out.

taps

12:54 pm on Dec 7, 2004 (gmt 0)

10+ Year Member



Birdman has the right idea. But maybe you better check for "Googlebot" when your site is crawled by Googlebot - like

if (stristr($_SERVER['HTTP_USER_AGENT'], "Googlebot"))
{
//use other stylesheet
}
else
{
//use default stylesheet
}

So the bot will be use the better stylesheet and he will show this style in his cache too.

I don't know if this is already cloaking. But I think it should be no problem if the content stays the same. (I know - this discussion belongs into another forum).

Birdman

2:44 pm on Dec 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Rubenski,

Yes, in a way, you are correct. On the other hand, it can still be done like I noted above.

Google doesn't cache the stylesheet, it gets pulled from your server, even on cache views.

However, you would have to force the server to parse .css files for PHP, to do it that way. I don't like that idea at all.

Fortunately, there is a better way....mod_rewrite!

RewriteEngine on
RewriteCond %{REQUEST_URI} ^normalstyle.css$
RewriteCond %{HTTP_REFERER} search?q=cache
RewriteRule ^$ /googlecachestyle.cssv [L]

Keep in mind that I just wrote this code off the top of my head and it may have an error :)

Thanks Taps, for yet another solution!