为什么浏览器对 W3C 标准的支持这么差?

发布于 2024-07-14 03:29:12 字数 85 浏览 6 评论 0原文

我想不通。

是因为开发浏览器的人不在乎吗? 是因为我们作为开发人员已经编写了黑客代码来解决在浏览器 X 和 Y 中不起作用的问题吗?

I can't figure it out.

Is it because the people making the browsers don't care? Is it because we, as developers, already write hack code to get around things that don't work in browser X and Y?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(12

多像笑话 2024-07-21 03:29:12

我讨厌成为链接乔尔文章的人,但这篇文章是这个问题的最佳答案之一。

http://www.joelonsoftware.com/items/2008/03/17.html不幸

的是,它太长了,当你读到它并认为这是一篇很棒的文章时,你会忘记你是如何到达那里以及你应该升级谁的。 :)

I hate to be the guy that links a Joel article, but this article is one of the best answers to the question.

http://www.joelonsoftware.com/items/2008/03/17.html

Unfortunately it is so long that by the time you read it and think wow that was an amazing article you will forget how you got there and who you were supposed to upmod. : )

眼泪都笑了 2024-07-21 03:29:12

历史

曾经有过浏览器大战,最终由 Internet Explorer 获胜,供应商故意实施了与其他浏览器不兼容的功能使这些网站带有这些小徽章专为 Netscape 4.5 设计

通过不兼容和拥有独特的功能,微软赢得了浏览器之战,至少在几年内是这样。

很难

你是否尝试过在相当标准兼容的浏览器中使用复杂的 CSS? 因为标准很复杂,所以很难创建任何东西。 我想实现起来更加复杂。

旧网站

许多网站在设计时都考虑到了错误的 HTML 实现(请参阅我的第一部分)。 如果所有浏览器都实现 100% 兼容的渲染引擎,许多网站就会崩溃。 他们正在努力逐步把事情做好。

History

There was the Great Browser War, which was eventually won by the Internet Explorer, where vendors deliberately implemented features that weren't compatible with other browsers to have those websites with those small badges Designed for Netscape 4.5.

By being incompatible and having unique features Microsoft won the browser war, at least for several years.

It's hard

Have you ever tried to use complex CSS in a fairly standard-compatible browser? It's hard to create anything because the standards are complicated. I guess the implementation is even more complicated.

Old websites

Many websites were designed with wrong HTML implementations in mind (see my first section). If all browsers just implemented 100% compatible rendering engines, many websites would break. They are trying to gradually get it right.

守不住的情 2024-07-21 03:29:12
  • 规范中的许多边缘情况未指定/未指定,并且浏览器最终以不同的方式实现它们(例如,HTML 在 v5 之前无法指定错误恢复)。

  • 大范围的“标准”是事实上的标准,它们是浏览器战争的遗留物,并且没有适当的规范 - 如果有的话(例如 DOM0)

  • 一些规范很难理解并且很难实现(例如 CSS 视觉格式化模型 - 匿名框、折叠边距和内联格式化上下文的详细信息可能会让您头晕)

  • 对于浏览器供应商来说,与现有页面完美兼容比实现新功能/标准更重要尽快给他们带来竞争优势。 如果标准和网站不一致,网站总是获胜(这就是为什么 W3C 必须采用 HTML5 以避免变得无关紧要)。

  • Many edge cases in the specs are unspecified/underspecified and browsers end up implementing them differently (e.g. HTML failed to specify error recovery until v5).

  • Large areas of "standards" are de-facto standards that are leftovers from browser wars and don't have proper specifications – if any (e.g. DOM0)

  • Some specs are simply hard to understand and hard to implement (e.g. CSS visual formatting model – details of anonymous boxes, collapsed margins and inline formatting contexts might make you dizzy)

  • It's more important for a browser vendor to have perfect compatibility with existing pages rather than implement new features/standards that won't give them competetive advantage anytime soon. If standards and websites disagree, websites always win (that's why W3C had to adopt HTML5 to avoid becoming irrelevant).

旧时模样 2024-07-21 03:29:12

也许是因为浏览器在 w3c 标准之前就已经存在,并且不会为了满足不断变化的需求而从头开始重写。 我认为他们在逐步实现新功能方面做得很好。

Perhaps it's because browsers existed before the w3c standards and are not about to rewrite from scratch just to conform to ever changing requirements. I think they do a good job implementing new features incrementally.

南城追梦 2024-07-21 03:29:12

你说的是哪些浏览器? WebKit 和 Opera 的引擎都对 W3C 标准有相当好的支持(例如,都在不久前通过了 Acid3)。 Firefox 在某些方面还有些欠缺,但仍然相当不错。 IE...嗯,IE 是如此流行,以至于 Microsoft 并不真正关心,而且 Microsoft 也不以与其他人友好相处而闻名。

当然,即使是最符合标准的浏览器在解析 Web 标记时仍然允许有一点宽松,但这主要是因为,从历史上看,Web 设计者/开发人员并没有真正努力地工作来达到标准。 - 也符合规定。

What browsers are you talking about? WebKit and Opera's engine both have fairly good support for W3C standards (for example, both passed Acid3 a while back). Firefox is a bit lacking in some areas, but is still pretty good. IE...well, IE is so popular that Microsoft doesn't really care, and Microsoft isn't know for playing nice with other people anyway.

Of course, even the most standards-compliant browsers still allow a bit of looseness in their parsing of web markup, but that's mostly because, historically, web designers/developers haven't worked really hard to be standards-compliant, either.

玩世 2024-07-21 03:29:12

实际上,大多数浏览器都很好地支持开放标准,包括世界上一些最古老的浏览器,例如 Opera(大约有 15 年历史)和 FireFox(在某种程度上基于 Netscape)我想也是从 1993 年开始的。

唯一遇到“w3c 标准问题”的是微软,坦率地说,为什么他们“遇到这么多问题”,我认为你应该问他们。 但我的猜测是,他们在支持标准方面看不到任何“钱”,因为这将使创建便携式应用程序变得更容易,并促进竞争等等......

虽然已经说过,但目前有一个挪威正在进行一场旨在永久消灭地球表面 IE6 的大规模活动,请阅读此处的一些亮点; http://ra-ajax.org/ ground-zero-in-the-ongoing-war-against-ie6.blog

这是我最喜欢的;)

http://ra-ajax.org/facebook-joins-the-war-against-ie6.blog

ACutally most browsers are pretty good in supporting the Open Standards, including some of the oldest browsers in the world like Opera (which is like 15 years old) and FireFox which is to some extend based on Netscape which is like also from 1993 or something I think.

The only ones having "problems with w3c standards" are Microsoft, and frankly why they are "having so much problems" I think you should ask them about. But my guess is that they don't see any "money" in supporting standards since that would make it easier to create portable applications and such fostering competition and so on...

While that has been said, there is currently a massiv campaign going on in Norway to permanently KILL IE6 of the face of the earth, read up some of the highlights here; http://ra-ajax.org/ground-zero-in-the-ongoing-war-against-ie6.blog

And this one is my favorite ;)

http://ra-ajax.org/facebook-joins-the-war-against-ie6.blog

零時差 2024-07-21 03:29:12

为了“捍卫”IE(尤其是其标准支持较差),他们声明这是为了保持与最后 1 亿个期望 IE 中“旧”行为的网站的向后兼容性。

好消息是,在 IE8 中,如果您的页面设置正确,您可以在默认情况下期待更好的基于标准的渲染和脚本执行。

To "defend" IE (which notably has the worse standards support), they state that it is to maintain backwards compatiblity with the last 100-million web sites that expect the "old" behavior in IE.

The good news is that in IE8, you can Expect better standards based rendering and script execution by default, if your page is set up correctly.

终弃我 2024-07-21 03:29:12

这只是所有供应商都不会支持的标准的一部分。 我们可能会猜测,浏览器开发人员在为浏览网页的用户添加或增强功能方面感受到了更大的压力,而不是重构他们的解析器和布局代码以使其更加一致。

基本上,这似乎“足够好”,因为我们都知道如何跳过障碍来绕过它。

It's just part of having a standard that all vendors won't support it. The browser developers, we might guess, feel more pressure to add or enhance features for the users browsing the web rather than refactoring their parsers and layout code to be more conformant.

Basically, it seems 'good enough', since we all know how to jump through the hoops to get around it.

一身骄傲 2024-07-21 03:29:12

问题之一是保持对旧站点的向后兼容。 例如,许多符合标准的浏览器如果是为 IE6 及更早版本制作的,则无法正确显示网站。 作为补偿,更流行的浏览器(IE7/8 和 Firefox 3)尝试弥补这一限制 - 保留显示尽可能多的网页的能力(即使页面不兼容),同时也接近 W3C 标准。

我怀疑这在几年内将不再是问题。

One of the problems is remaining backwards compliant with old sites. For example, many standards-compliant browsers won't display sites correctly if they were made for IE6 and before. To compensate, the more popular browsers (IE7/8 and Firefox 3) try to bridge the cap - retain the ability to display as much of the web as possible (even if the page is noncompliant), while also coming close to the W3C standards.

I suspect that this will become a non-issue within a few years.

勿忘初心 2024-07-21 03:29:12

这是一个“多对多市场”。

阅读乔尔·斯波尔斯基 (Joel Spolsky) 的精彩文章。

It's a "Many-to-Many Market".

Read Joel Spolsky's excellent article.

烟酒忠诚 2024-07-21 03:29:12

如果浏览器完全遵守标准,那么大多数网站将无法访问。 必须有一个妥协。

If the browsers adhered to the standards fully then most websites would not be accessible. There must be a compromise.

明媚殇 2024-07-21 03:29:12

Dilbert 希望加入推动 Web 服务标准的行业联盟。

华而不实 - http://www.dilbert.com/strips/comic/2005 -12-31/

少一些浮华 - http://www.dilbert .com/fast/2005-12-31/

Dilbert wants to join the industry consortium promoting web services standards.

Flashy - http://www.dilbert.com/strips/comic/2005-12-31/

Less Flashy - http://www.dilbert.com/fast/2005-12-31/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文