Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why did Google leave html tag open?

Tags:

html

In Google' s 404 page, html tag is used without a closing tag. You can see the code yourself by navigating to www.googleusercontent.com This doesn't generate any error on w3c validator. Why is that?

<!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 404 (Not Found)!!1</title>
  <style>
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}
  </style>
  <a href=//www.google.com/><img src=//www.google.com/images/errors/logo_sm.gif alt=Google></a>
  <p><b>404.</b> <ins>That’s an error.</ins>
  <p>The requested URL <code>/</code> was not found on this server.  <ins>That’s all we know.</ins>
like image 961
refik Avatar asked Apr 24 '12 11:04

refik


Video Answer


1 Answers

This should help explain:

According to Google’s latest guidelines to speed up the web, there are a number of optional tags in HTML4 that you can omit to save speed, even if it makes you feel a little queasy as a developer. (Google is quick to point out these tricks are for HTML and not XHTML.)

The Google homepage and search results pages don’t end their <body> and <html> elements. They just leave them open– a lot like a lazy developer might do and then feel guilty when he comes back and sees the mistake.

Only this “mistake” is really part of Google’s strategy of treating their performance as a competitive advantage. All browsers work well without the tags and the tags take up time, so they’re excited to eliminate any millisecond they can for their visitors.

http://blog.errorhelp.com/2009/06/27/the-highest-traffic-site-in-the-world-doesnt-close-its-html-tags/

like image 169
Curtis Avatar answered Oct 16 '22 05:10

Curtis