Does anybody know why google.com isnt well-formed?

R

Robert Tomsick

muelli75 said:
Hi!

Checkout http://www.google.com and display the source-code.

I´m missing the </body> and </html>.

Does anybody know why google doesnt know much about HTML? :)

Because it saves them precious bytes, and browsers appear to cope with it
just fine.

Google's got the resources to test this sort of thing, and given that any
tricks they can use to save bandwidth have a pretty substantial effect (just
how many times a day is their index page loaded?) they probably think it's
worth it to violate the spec.

Cheers,
Rob
 
R

R. Andersen

The file is just shy of 15Kb. It only has 12 lines, the longest of
which is 6,506 characters long! I can't imagine how anyone could
possibly maintain that code. :p

They have a non-minified edition for maintenance, then before putting
it online they minified it to save bandwidth. Atleast that what I think.
 
D

Dylan Parry

muelli75 said:
Checkout http://www.google.com and display the source-code.

I´m missing the </body> and </html>.

Does anybody know why google doesnt know much about HTML? :)

It might seem bizarre, bug it's perfectly valid to leave out those
closing tags. In fact, it's perfectly valid to omit body tags
altogether.
 
J

Jukka K. Korpela

Dylan said:
It might seem bizarre, bug it's perfectly valid to leave out those
closing tags. In fact, it's perfectly valid to omit body tags
altogether.

Yes, though that's a bit odd formulation. Either some markup is valid,
relative to the declared DTD, or it is not valid. There's really no such
thing as degrees of validity, though in practices, sometimes markup error
create chaos whereas often they are just formal errors.

But the question in the Subject line - the question that was not repeated in
the original message body, violating good practices - was why Google.com
isn't well-formed. Well-formedness is an XML concept. (An odd one. Being a
well-formed XML document means being an XML document. Instead of being a
good technical term, it is a pseudo-term that lets people talk about "XML
documents" loosely, including documents that violate fundamental XML rules,
which constitute part of the definition of XML, but are still in some sense
presented or submitted as XML.)

The answer is that Google.com does not purport to be XML, in any way, so any
XML-based question about it is irrelevant.
 
C

cwdjrxyz

Hi!

Checkouthttp://www.google.comand display the source-code.

I´m missing the </body> and </html>.

Does anybody know why google doesnt know much about HTML? :)

Check the page at the W3C validator. You will find it has <!doctype
html> which is the correct doctype for html5. Note that the W3C still
considers html5 experimental and notes this on the validation report.
The validation as html5 notes no errors for not including </body> and
</html>. I believe these are considered optional. I am not going to
take the time for checking this out in detail at the W3C, because
html5 is still experimental, not all of it is supported by even the
most recent versions of popular browsers, and it is likely to change
before it is officially adopted.

However view the 35 errors the validator finds. It uses a lot of
obsolete tags, for one thing, and much of the page looks as it were
taken from the html 3.2 era with a html5 doctype at the top. The page
will still work, because outmoded older code still is supported by
most newer browsers. Also note this page changes from day to day. The
person who wrote this page or was required to write this page, should
be carefully checked by Google management. He/she should first explain
why each validation error is necessary. He/she should next be required
to write all new pages to validate completely unless a comment giving
the reason for ignoring each error is given. The job description
should be updated to require this. The person should be given a
reasonable time to update their knowledge of html, if necessary. After
that, inability to write valid pages, with possible exceptions
mentioned above, should result in an unsatisfactory performance review
and firing or moving to another less demanding position.

A few mostly large companies are jumping the gun for html5 before it
is even official. One must wonder at the reasons for this. I think a
large part of this concerns media. Apple has been having all sorts of
bad things to say about flash video, which is now the most used video
format, and at least many of the newer Apple smaller devices will not
support flash. It is sometimes said that one reason html5 is liked is
that it can be used to avoid "name brand" players and code. While this
may be true, the examples I have seen are using extensive, rather
advanced Javascript to do so. Fortunately, I have found that html5 can
still support media written for "name brand" players. And remember
nothing says you have to use html5, xhtml, or html4.1. The W3C
validator will check all of these versions and several more. If you
have an old, very long, html 3.2 page you need to revise, you do not
have to upgrade to a higher level of html. The W3C validator will
still validate it as html 3.2 if your code is correct, and most
browsers still will show the page correctly.
 
N

Neredbojias

My attitude about this, and writing HTML/CSS, is, ok, try to comply.
Try hard and well. But, ultimately, testing in actual browsers is
the real test. Does it work in the real world?

Google is, after all, kind of a successful company (irony intended).
Should they care if their HTML/CSS conforms to some iffy standard?
Or should they make sure their business/product works for users?
I've never heard of anyone complaining that "Google doesn't work for
me." By that I mean - "The home page and the results pages don't
display right and I can't use the service." Never once heard that.

We can run Google through the W3C Validator all we want but the acid
test is: Do the business and product work and are they making money?

Lofty and pure goals of standards and compliance are fine. Making
money, creating value for shareholders and customers is the real
goal. Well, assuming you're living in the real world of consumers and
business.

I dunno whether I agree with that. If nothing else, there is such a
thing as setting a good example. Secondly, extensive testing or not, I
doubt they can test _every_ possible situation _every_ time they make a
non-compliant change. Thirdly, and despite what a lot of fools here in
the US think, money, meaning making money, is NOT the top priority in
anything, even in business. Keeping the business viable and healthy is
the top biz priority and that amounts to much more than simply the most
"economical" way to make money.
 
A

Adrienne Boswell

Gazing into my crystal ball I observed Neredbojias
Thirdly, and despite what a lot of fools here in
the US think, money, meaning making money, is NOT the top priority in
anything, even in business. Keeping the business viable and healthy is
the top biz priority and that amounts to much more than simply the most
"economical" way to make money.

I agree with you completely. Consider this conversation:

Collector: "Hello, am I speaking to Jane Doe? I am calling for Debt
Collection Service in the US, and I am speaking from Another Country"

Jane Doe: "Yes, this is Jane"

Collector: "Can you pay?"

Jane Doe: "No, I cannot. I do not have a job"

Collector: "Why do you not have a job?"

Jane Doe: "Because YOU have my job."
 
R

Robert Tomsick

Neredbojias said:
I dunno whether I agree with that. If nothing else, there is such a
thing as setting a good example. Secondly, extensive testing or not, I
doubt they can test _every_ possible situation _every_ time they make a
non-compliant change. Thirdly, and despite what a lot of fools here in
the US think, money, meaning making money, is NOT the top priority in
anything, even in business. Keeping the business viable and healthy is
the top biz priority and that amounts to much more than simply the most
"economical" way to make money.

I agree with you that short-term profits shouldn't be everything to a
business. Google's smart, and I think they *do* realize that it's not all
about the next quarter's earnings. Over the last several years, they've
demonstrated that "don't be evil" is actually a pretty good way to make
money. In this case, however, the numbers simply don't work out on the side
of valid HTML. What percentage of the people visiting
http://www.google.com/ know what valid HTML is? Of those, what percentage
of those people actually care, provided the site works? And of those, what
percentage do you think will switch search engines on the basis of their
markup? Although I haven't actually performed any calculations to determine
the size of those three groups, I'd wager that the last one is quite small
indeed.

Yes, Google does embrace web standards where it counts -- they are strong
proponents (and developers) of modern web applications, they maintain a
browser which uses the highly "standards-oriented" WebKit engine, publish a
good bit of literature on a number of web-related topics, maintain a number
of tools to help web application developers, and even go so far as to offer
pilot programs that almost certainly cost them more to run than they make
(e.g. YouTube's HTML 5 support).

What they *don't* do is engage in fanatical obedience of web standards when
they have a good reason to do otherwise. In the case of the front page, I'm
willing to bet that whatever invalid markup affords them -- be it a decrease
in bandwidth, easier markup generation, or something else I can't guess --
it works out to be worth the extra costs of increased testing and lost
revenue from the very few people who care enough to switch.
 
N

Neredbojias

Gazing into my crystal ball I observed Neredbojias


I agree with you completely. Consider this conversation:

Collector: "Hello, am I speaking to Jane Doe? I am calling for Debt
Collection Service in the US, and I am speaking from Another Country"

Jane Doe: "Yes, this is Jane"

Collector: "Can you pay?"

Jane Doe: "No, I cannot. I do not have a job"

Collector: "Why do you not have a job?"

Jane Doe: "Because YOU have my job."

Yep. I blame the govt for that more than the companies, though both
are guilty. No, we can't live isolated from the world economy, but we
can certainly protect "American jobs" (-meaning US labor interests)
much, much better than has been done in the past. I used to work for
Intel and was around when much of their assembly/mfg sections moved to
_China_, among other places (-such as The Philipines). Fine, you want
cheap labor, go and get it, but then you're no longer a 100% American
company and you'll have to pay a tariff on anything you sell in the US
and the proceeds of that tariff will go fully and directly into "The
Sustenance Fund For Workers Wgo Get Screwed By Big Business and Govt."
What gets me is there are examples in certain other parts of the world
of how it can be done and should be done, but the big money men here
pointedly avoid such things which they see as taking money out of their
pockets.

Anyway, enough economics - for me, at least. I get too POed. When it
comes down to it, the real culprit-in-general is the average American
citizen because he is simply too stupid to see what's going on all
around him.
 
N

Neredbojias

I agree with you that short-term profits shouldn't be everything to a
business. Google's smart, and I think they *do* realize that it's
not all about the next quarter's earnings. Over the last several
years, they've demonstrated that "don't be evil" is actually a pretty
good way to make money. In this case, however, the numbers simply
don't work out on the side of valid HTML. What percentage of the
people visiting http://www.google.com/ know what valid HTML is? Of
those, what percentage of those people actually care, provided the
site works? And of those, what percentage do you think will switch
search engines on the basis of their markup? Although I haven't
actually performed any calculations to determine the size of those
three groups, I'd wager that the last one is quite small indeed.

Yes, Google does embrace web standards where it counts -- they are
strong proponents (and developers) of modern web applications, they
maintain a browser which uses the highly "standards-oriented" WebKit
engine, publish a good bit of literature on a number of web-related
topics, maintain a number of tools to help web application
developers, and even go so far as to offer pilot programs that almost
certainly cost them more to run than they make (e.g. YouTube's HTML 5
support).

What they *don't* do is engage in fanatical obedience of web
standards when they have a good reason to do otherwise. In the case
of the front page, I'm willing to bet that whatever invalid markup
affords them -- be it a decrease in bandwidth, easier markup
generation, or something else I can't guess -- it works out to be
worth the extra costs of increased testing and lost revenue from the
very few people who care enough to switch.

Well, me, myself, I, and virtually all people I know wouldn't switch
over something so trivial, but I still think they should make an effort
to be compliant. Slipshodery has a way of propagating, particularly in
a company, and today's supposedly well-reasoned shortcuts can become
tomorrow's rationalized miscues. IOW, it will eventually "bite them in
the ass". As for the web browser, I think the way that it's updated
sucks. And switching from the beta version-stream to the "regular"
version-stream is a real laugh. And I could go on, -about their
preferences and other things, but why beat a dead horse? <g> It's
fast, yes, but part of the reason for that extra speed might be all the
things they left out which should be included to make a really complete
browser.
 
H

Helpful person

Hi!

Checkouthttp://www.google.comand display the source-code.

I´m missing the </body> and </html>.

Does anybody know why google doesnt know much about HTML? :)

Martin

I've been reading this thread with some amusement at the depth of
outrage from a few people. It seems to me that the purpose of a
standard is to allow programmers to write code that will display
correctly in all browsers (assuming the browsers are compliant). It
should not (and does not) put restrictions on the manner in which code
is written.

I have no doubt that the programmers at Google know exactly what they
are doing and have excellent reasons for their code. (Some have been
pointed out.) Unless you are concerned with maintaining the site it's
non of your business. Let's just congratulate Google on their depth
of knowledge of browser implementation and the tools they most
certainly use to create efficient code.

www.richardfisher
 
D

dorayme

Ed Mullen said:
by definition, a "business" exists to
make a profit

Businesses can exist for all sorts of purposes, and one would not
cease existing (like the Wizard of Oz when water drenched her) if
the owner was happy that it ran breaking even or at a small loss
so that her staff were kept in employment. Indeed an owner might
run the business deliberately at no profit, the better it does,
the higher the wages paid to staff.
 
N

Neredbojias

But don't you think that they'd hear about it if there was some
situation where a potential user had a real problem?

Does the possibility exist that they wouldn't "hear about it" if a
small percentage of users had problems, perhaps of a varying nature,
and some were even intermittent or dependent upon the browser they used
with their particular setup? I think so. Furthermore, who's to say
they _don't_ hear about it? How would we know if they did and chose to
ignore the complaints because they originated from only a minor portion
of their user-base? I'll bet if you ask a million Google users, a few
at least will be able to relate technical problems they've experienced
thereupon in the last 5 years or so.
Not quite sure what you intend with that. A business's raison d'etre
is to make money for it's owners, whether it's a publicly-held or
privately-held entity. I mean, by definition, a "business" exists to
make a profit. Yes, surely, a company can do other things as well
but its primary reason for existence is to sell goods or services at
profit and provide a profitable return to its investors.

Sure, that's the first thing they teach in business schools, courses,
etc. Without dragging up obvious exceptions, a business couldn't
survive if it didn't make a profit. And basically, I have no objection
to that. But take the case of Joe.

Joe works for "The Company" and has for over 30 years. He's not the
brightest firefly in the alfalfa field but he does his job well, hardly
ever misses a day, is loyal and true to company policy, and comes to
company meetings smelling like English Leather. He's both a "company
man" and nice guy, and even his subordinates like him.

One day the CEO of the company is approached by the efficiency expert
he hired the month before who says, "Ya know, if we get rid of Joe, we
can hire a hungry new biz school grad who'll do the job at least as
well at half the price or less..."

What should the CEO do?

The EE continues: "And, btw, here's a list of people who fit in the
same category. We're talking millions per year here..."

Now what should the CEO do?

It's just an example. There are many other things which have a bearing
on the "Prime Directive" of a company including fair business
practices, ethical advertising, etc., etc., etc. But the point is that
if the company has to do things I don't want it to do in order to make
money, I'd rather see it go bust than screw me. Wouldn't you?
If it chooses to take some of its profits and invest in "social good"
type of programs, well, that's fine. But it's not the reason for the
existence of the business. And it shouldn't be the motivator for the
employees of the company. Their job should be focused on selling
widgets or widget-sevices at a profit.

Okay, no argument. But what if they're underpaid? Or overworked? Or
both? How "focused" can I be if I know I'm receiving sub-par wages but
need the job nonetheless (-something is better than nothing and one has
to eat.) Actually, it's the "controls" on a company, both internal and
external, we're talking about, not the mootness of it's prime
directive. If a company can stay liquid only by underpaying its
employees and/or cheating its customers, that company _should_ go out
of business! Period.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top