views:

1256

answers:

3

So, I couldn't help noticing while demonstrating Chrome's DOM browser thing to my brother, that Google uses a <font size=-2> tag.

I know this is a stupid question, but from a programming point of view--why would they use a deprecated tag on Google? Is it because it's smaller than using <p class="whatever"> and then creating a style for it, or just going <p style="font-size: x-small">?

+52  A: 

Saving a few bytes on the Google homepage likely saves them terabytes of transfer bandwidth.

ceejayoz
you're right, I figured this after I looked at the source outside of the DOM browser and saw that it was all condensed
Carson Myers
Google is almost certainly using gzip compression too. So the savings are less significant after compression but probably still significant at Google's scale. At **your** scale, the savings are almost certainly **insignificant** (no offense). Don't use the `<font>` tag just because Google does.
Asaph
+1 for not doing something just because Google does.
ceejayoz
oh, believe me, I stick to validating markup.
Carson Myers
+74  A: 

In November 2005, Matt Cutts, a Google software engineer, said:

Google’s home page doesn’t validate and that’s mostly by design to save precious bytes. Will the world end because Google doesn’t put quotes around color attributes? No, and it makes the page load faster.

Source: Google Blogoscoped - Matt Cutts, Google’s Gadgets Guy (Interview)

Daniel Vassallo
+1 for a great source.
ceejayoz
ceejayoz: +1 for your intuition, even without a good source. A merited Enlightened badge :)
Daniel Vassallo
Interestingly...they serve their home page gzipped. Deflating it would be both faster (to compress/decompress) and at least 4 bytes smaller in every case.
David Murdoch
+7  A: 

Space saving issues is certainly one reason google might use the font and center tags. Another reason could be for compatibility.

It's in google's best interest to make their homepage to work in all browsers, including pre-IE6 and mobile browsers. Since the font and center tag are so ancient, they're almost universally supported.

Xavi
I really doubt that Google has an interest in being compatible with 13 year old browsers. This would contradict their efforts to push for rich web applications like GMail and Google Docs.
Daniel Vassallo
The google home page makes billions of dollar. GMail and Google Docs make tens of million, maybe hundreds millions? Which "effort" do you think Larry and Sergey are optimizing for?
Xavi
Centering content is notoriously hard to achieve with just CSS, even with modern browsers. Using the `center` tag is a widely supported alternative. Also, it's extremely difficult to surmise a corporation's intentions from the outside. I'm just trying to present a possible reason why google would do something so strange.
Xavi
Centering content in CSS is easy. `margin: 0 auto` for block-level elements, `text-align: center` for non-block elements.
ceejayoz
Assume "ancient" browsers make up 1% of google's traffic (this may actually be conservative -- old browsers, bad mobile browsers, obscure things like screen readers for the blind...). Assume google makes 1 billion a year in revenue from search traffic (this may be conservative). Increasing revenue by 1% would mean $10 million a year.
Frank Farmer