Search code examples
htmlvalidationw3cgoogle-searchweb-standards

Google doesn't follow W3C standards... whaaa?


A friend of mine just pointed out an interesting phenomenon... I went to the Google home page and looked at the source code:

<!doctype html><html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Google</title>
...
...
...
A LOT OF STUFF HERE
...
...
...
</script>

... so I noticed that source code doesn't have the closing </body> and </html> tags. Using Chrome's Inspector, it shows the closing tags but when I right click and look at the source, its not there.

What is going on here? Am I missing something? I tried using the W3C HTML Validator and it showed a bunch of errors...

http://validator.w3.org/check?verbose=1&uri=http://www.google.com/

So... what's the deal?


Solution

  • Google has a semi-official answer as a youtube video.

    Basically when considering they're handling hundreds of millions of requests, they try to minimise the number of bytes sent per request. It's a tradeoff between validation, size and compatibility with different browsers used across the web.