为什么Google主页使用弃用的HTML(即无效的HTML5)? [英] Why does the Google homepage use deprecated HTML (ie. is not valid HTML5)?

查看:153
本文介绍了为什么Google主页使用弃用的HTML(即无效的HTML5)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在查看Firebug中的 www.google.com ,并注意到一些奇怪的事情:Google徽标使用中心标签居中。

I was looking at the www.google.com in Firebug and noticed something odd: The Google logo is centered using a center tag.

所以我去了 W3C验证器,它发现了48个错误。现在,我知道有些时候您无法生成有效的网页,特别是当我们谈论诸如 www.google.com 之类的内容时,您希望它成为尽可能小,但有人可以解释为什么他们使用中心标签?

So I went and checked the page with the W3C validator and it found 48 errors. Now, I know there are times when you can't make a page valid, especially when we're talking about something like www.google.com and you want it to be as small as possible, but can someone please explain why they use the center tag?

推荐答案

几年前,我参加了SXSW的一个名为F * ck标准的小组,这说得通。在面板上有一位Google工程师谈论Google主页失败验证,使用不赞成使用的标签等。他说这完全是关于性能。在这种情况下,他特别提到了使用表格跳动div和CSS的布局渲染。只要这个网页为他们的用户工作,他们就会优于标准的性能。

I attended a panel at SXSW a few years ago called "F*ck Standards" which was all about breaking from standards when it makes sense. There was a Google engineer on the panel who talked about the Google home page failing validation, using deprecated tags, etc. He said it was all about performance. He specifically mentioned layout rendering with tables beating divs and CSS in this case. As long as the page worked for their users, they favored performance over standards.

这是一个非常简单的页面,流量很大,所以很有意义。我想如果你正在构建一个复杂的应用程序,这种方法可能无法很好地扩展。

This is a very simple page with high traffic so it makes sense. I imagine if you're building a complex app that this approach might not scale well.

从马的嘴巴。

这篇关于为什么Google主页使用弃用的HTML(即无效的HTML5)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆