Welcome to WebmasterWorld Guest from 22.214.171.124
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.
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.
I'm not enough of a validation purist to start rewriting other people's URLs.
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.
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.
str+='<form action="\/search" name="f"><table cellpadding="0" cellspacing="0"><tbody><tr valign="top"><td width="25%"> <\/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"> <a href="\/advanced_search?hl=en">Advanced Search<\/a><br> <a href="\/preferences?hl=en">Preferences<\/a><br> <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>';
CDATA excludes code from being parsed by the markup engine, and it will pass the lint if that's your main objective.
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.
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.
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.
.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.
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.
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]
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.