homepage Welcome to WebmasterWorld Guest from 54.146.190.193
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Google / Google AdSense
Forum Library, Charter, Moderators: incrediBILL & jatar k & martinibuster

Google AdSense Forum

This 46 message thread spans 2 pages: < < 46 ( 1 [2]     
AdSense for Search May Cause Pages to Not Validate
When Publishers Use Two Per Page
Lame_Wolf

WebmasterWorld Senior Member lame_wolf us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 3829169 posted 1:26 am on Jan 19, 2009 (gmt 0)

You are allowed 2 adsense for search per page, yet if you do, your page no longer validates.

The offending piece of code is :
id="cse-search-box"

As we are not allowed to alter the code, what are we to do ?
I like/want my pages to validate.

 

vordmeister

10+ Year Member



 
Msg#: 3829169 posted 9:59 pm on Jan 20, 2009 (gmt 0)

I'm guessing you are an SEO pageoneresults. I've had a few clients whose code errors really were messing up their rankings.

If you have the team and the traffic you can probably save a lot of bandwidth and get rid of the niceties just as Google do on their homepage - a guy sat there checking different browsers is probably cheaper for them even than including whitespace in their code.

It would concern me if newbies got the idea from this thread that coding quality wasn't important. Remember the people who have posted here are experts and they know what errors they can get away with.

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3829169 posted 10:37 pm on Jan 20, 2009 (gmt 0)

I get rid of all HTML errors so that if it fails to display properly then it is a compatibility issue, not the error routines in the browser failing to correct incorrect coding.

buckworks

WebmasterWorld Administrator buckworks us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3829169 posted 6:04 am on Jan 21, 2009 (gmt 0)

Users of the default browser and browser settings are also the most impulsive ad clickers. People who choose less popular systems, browsers, settings tend to avoid clicking ads.

The flip side of that argument is that minority browsers and systems would tend to have a higher proportion of savvy users ... the kind who would know how to create a link to you if they liked your site.

We all like to please the ad clickers ... but I like it even more when my site manages to please other webmasters who then link to it.

That said, I invest a great deal of effort to make sure my main templates validate. However, I'll usually settle for less than full validation if the validator is whining about something like an ampersand in the URL of someone I'm linking to. I'm not enough of a validation purist to start rewriting other people's URLs.

OnlyToday

5+ Year Member



 
Msg#: 3829169 posted 6:29 am on Jan 21, 2009 (gmt 0)

I'm not enough of a validation purist to start rewriting other people's URLs.

Let's not forget that this thread was begun by just such a purist and I have been addressing that problem in my posts.

People who have been attacking my statements have been ignoring that and projecting all kinds of irrelevant coding philosophies on them. Well their ideas may have merit and you may or may not learn from them but these are not about the OP's problem.

Robert Gentel

5+ Year Member



 
Msg#: 3829169 posted 6:42 am on Jan 21, 2009 (gmt 0)

If you only care about making the page validate in the validator:

You can always have js write in the markup (I assume that doesn't violate their terms as it doesn't change the code but check for yourself) and it will validate.


<script language="JavaScript" type="text/javascript">
//<![CDATA[

function writeJS(){
var str='';
str+='<form action="\/search" name="f"><table cellpadding="0" cellspacing="0"><tbody><tr valign="top"><td width="25%">&nbsp;<\/td><td align="center" nowrap="nowrap"><input name="hl" value="en" type="hidden"><input autocomplete="off" maxlength="2048" name="q" size="55" title="Google Search" value=""><br><input name="btnG" value="Google Search" type="submit"><input name="btnI" value="I\'m Feeling Lucky" type="submit"><\/td><td nowrap="nowrap" width="25%"><font size="-2">&nbsp;&nbsp;<a href="\/advanced_search?hl=en">Advanced Search<\/a><br>&nbsp;&nbsp;<a href="\/preferences?hl=en">Preferences<\/a><br>&nbsp;&nbsp;<a href="\/language_tools?hl=en">Language Tools<\/a><\/font><\/td><\/tr><\/tbody><\/table><table style="visibility: hidden; left: 586px; top: 196px; width: 359px;" class="gac_m" cellpadding="0" cellspacing="0"><\/table><input value="f" name="aq" type="hidden"><input value="" name="oq" type="hidden"><\/form>';
document.write(str);
}
writeJS();
// ]]>
</script>

I just used the google home page form, and a quick html to javascript converted and made it a cdata section, but you should be able to get the point with this example.

CDATA excludes code from being parsed by the markup engine, and it will pass the lint if that's your main objective.

swa66

WebmasterWorld Senior Member swa66 us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3829169 posted 7:21 am on Jan 21, 2009 (gmt 0)

The validator is only a tool, valid code is my goal.

netmeg

WebmasterWorld Senior Member netmeg us a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



 
Msg#: 3829169 posted 3:37 pm on Jan 21, 2009 (gmt 0)

The Google CSE Custom Search Box also causes problems.

Yea, but you can write and get permission to fix it if you happen to hit someone at Google who got up on the right side of the bed that morning and who has the ability to authorize it. I did, along with some other changes, but they were very careful to state that the permission was only for custom search code & formatting, and not AdSense code, and was not to be transferred to anyone else.

Which only goes to show that there's no reason Google can't just fix it and be done with it. This same issue comes up every few months or so.

Some jobs/clients require validation. I'm not going to debate the merits; there's no point. I prefer to have validating pages myself; it doesn't take extra effort to do it right once you get in the habit, and it's one less thing I have to worry about.

buckworks

WebmasterWorld Administrator buckworks us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3829169 posted 7:44 pm on Jan 21, 2009 (gmt 0)

From my point of view it would be great if the validator had the option to "ignore characters within URLs" when checking our pages.

That would make it a lot easier to identify errors that might be truly serious.

this thread was begun by just such a purist

I happen to agree with the OP about this particular grumble. People who hand out code snippets should take care that they won't break someone else's validation without a very compelling reason. There is no compelling reason here, it's simply lack of thought on Google's part.

OnlyToday

5+ Year Member



 
Msg#: 3829169 posted 1:20 am on Jan 22, 2009 (gmt 0)

I happen to agree with the OP about this particular grumble. People who hand out code snippets should take care that they won't break someone else's validation without a very compelling reason.

I happen to agree as well. But telling Google to behave will not solve the problem, saying that they are just thoughtless is the kindest way of putting it.

Ignoring validation or using only one search box seem to be the only alternatives. Talking about anything else is just a waste of time.

signor_john



 
Msg#: 3829169 posted 1:54 am on Jan 22, 2009 (gmt 0)

.People who hand out code snippets should take care that they won't break someone else's validation without a very compelling reason.

The programmer who wrote the script probably didn't think anyone would have a need to use more than one Google search box on a page. Come to think of it, the quickest way to solve the problem would be for Google to set a limit of one search box per page. No new code, no testing, just a few words changed in the TOS.

buckworks

WebmasterWorld Administrator buckworks us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3829169 posted 2:01 am on Jan 22, 2009 (gmt 0)

Changing ID to CLASS is even less than "a few words".

Lame_Wolf

WebmasterWorld Senior Member lame_wolf us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 3829169 posted 4:15 am on Jan 22, 2009 (gmt 0)

Let's not forget that this thread was begun by just such a purist and I have been addressing that problem in my posts.

If I was a purist as you claim, then why did I state that my site has 3 pages that do not validate ?

It's nothing about being a purist. It is about taking pride in one's work. It's the ability to put a good site into a portfolio and know if anyone wants to check/test it out, that it will hold it's own.
It could cost me getting a job with a client.

Every time I see a site that those valid html buttons on it, I always click on them, and a good 80% fail validation.

If I was wanting someone to make me a site then I would want to see his previous work. I will want to know what they rank for etc etc.
If I start looking at the code and see a lot of sloppy work, lot's of validation errors, typos, broken links, then I will think twice about hiring that person. I expect the same in reverse.
I

Lame_Wolf

WebmasterWorld Senior Member lame_wolf us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 3829169 posted 4:25 am on Jan 22, 2009 (gmt 0)

The programmer who wrote the script probably didn't think anyone would have a need to use more than one Google search box on a page.

Sorry, I have to disagree here. I used to work in the IT department, and worked along side programmers. (I was a systems test analyst). We all knew what we had to do because of test plans. We knew the regulations were, the boundaries etc etc. So there is no excuse that when they were testing this that they didn't test for two boxes as per their own TOS

Come to think of it, the quickest way to solve the problem would be for Google to set a limit of one search box per page. No new code, no testing, just a few words changed in the TOS.

Or a change in the TOS that says "You are allowed to alter id="cse-search-box" to id="cse-search-box2" if two search boxes are used on one page. No other alterations permitted."

Oh yeah, I can see it now... In a few weeks time this place would be flooded with people writing in saying that they have had their account closed because they had two boxes.

Or they will be writing in because the change in TOS has had a detrimental affect on their earnings because they had to remove one.

[edited by: Lame_Wolf at 4:29 am (utc) on Jan. 22, 2009]

OnlyToday

5+ Year Member



 
Msg#: 3829169 posted 5:25 am on Jan 22, 2009 (gmt 0)

Lame Wolf IMHO you worry too much about validation. We should just agree to disagree about the importance of validation.

robzilla

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3829169 posted 1:19 pm on Feb 8, 2009 (gmt 0)

Can I modify the AdSense for search code to comply with W3C HTML and XHTML standards? [google.com]
In general, as specified in our program policies, we don't permit modifications to the AdSense code; however we do allow specific modifications that allow our AdSense for search code to comply with W3C HTML and XHTML standards.

Doesn't solve the problem with two of the same DIV IDs, but I thought I'd mention it since we're talking about validation.

robzilla

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 3829169 posted 8:44 pm on Feb 28, 2009 (gmt 0)

Deleted. Thought I found a solution [google.com], but it turned out to be about Custom Search, and the code of Adsense for Search differs too much.

This 46 message thread spans 2 pages: < < 46 ( 1 [2]
Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Google / Google AdSense
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved