Jeffrey Zeldman must have thought he’d never live to see the day. Ten years after he co-founded the Web Standards Project, all of the major browser vendors have renewed their commitment to supporting World Wide Web Consortium (W3C) standards in the past few years — and they’re following through. The specifications in the latest standards initiatives are tighter than ever. Web authoring tools are generating more-compliant code. Two of the three rendering engines that underpin the major browsers in use today are open source.
And for the first time ever, the latest version of Microsoft’s browser, Internet Explorer 8, operates strictly in standards-compliant mode by default. In other words, it will support the W3C standards before it provides backward compatibility with nonstandard coding methods supported by Microsoft’s previous browsers.
Those who lived through the browser wars of the ’90s might think that hell has frozen over, were it not for one small problem: Users still experience plenty of problems on the Web. A recent report issued by browser vendor Opera Software ASA showed that the average page on the Web strays from WC3 page-markup specifications 47 times. Overall, just 4.13 percent of the 3.5 million Web pages Opera searched were fully standards-compliant when tested against the W3C validation suite.
Why? Because many older Web sites haven’t been updated, many developers still don’t design to modern standards and best practices, some browser vendors may interpret specifications differently from what was intended, and other vendors simply don’t fully implement all of the W3C-standard features.
As for the standards themselves, some specifications suffer from ambiguity or leave some features undefined. In addition, the improved thoroughness of the new standards has a downside: It has slowed the standardization process—a fact that has frustrated some Web developers and could tempt browser vendors to once again innovate outside of the standards framework.
Turning the ship
Microsoft’s Internet Explorer doesn’t dominate the browser market like it once did, but it still has the largest share by far—about 70 percent. Idiosyncrasies in the various versions of IE—especially IE6—have created problems for other browser vendors and Web developers. Even Microsoft has struggled to maintain backward compatibility in its own browser because of bugs and the use of nonstandard coding methods in various versions. As a result, Microsoft has had to drag along an installed base of corporate and public Web sites that were built to the quirks of IE’s previous versions, trapping itself into endless iterations of standards noncompliance.
Developers once coded their sites to the nonstandard methodologies and work-arounds required to support IE6 and earlier browsers. Those sites didn’t render properly when viewed with competing browsers, even if those browsers followed W3C standards. To address that, developers kept two sets of Cascading Style Sheets (CSS)—one for IE and one for everything else.
Times have changed. Rather than develop for IE first, many developers now code to a standards-compliant browser such as Mozilla’s Firefox and then present a different style sheet to IE users. That’s what Eric Meyer does. “In the end, I’ll fire it up in IE, find out what went wrong and work the code around that,” says Meyer, a Web developer, author and principal at Complex Spiral Consulting in Cleveland.
As Microsoft develops the next version of its browser, Internet Explorer 8, it has gotten serious about supporting standards first. “In the past, we’ve focused more on [backward] compatibility than interoperability. Now we’re trying to be as interoperable as possible,” says Chris Wilson, platform architect for Internet Explorer.
Microsoft is also playing a larger role at the W3C. But despite the progress, the company still lags behind other vendors in incorporating the latest W3C specifications, such as Scalable Vector Graphics, which is used in Firefox, Opera and Apple’s Safari.
Because many parts of Internet Explorer need updating, Microsoft had to choose where to focus its attention when it developed IE8. “We tried to move everything forward across the board in IE8, but we picked one area we wanted to get right,” and that was support for CSS 2.1, says Wilson. His goal is to have a complete implementation of CSS 2.1 when IE8 finally ships.
As with any other fully standards-compliant browser, IE8 will work on all Web sites that follow the standards — and break when visiting sites that were designed to exploit the proprietary features and other idiosyncrasies of IE6 and 7. To fix that, Web site designers will either need to make their Web sites conform to the standards or add a tag in the Web page header that tells IE8 to switch to IE7 behavior.
“Once that happens—once sites that worked fine in old versions of IE start breaking—the unwilling will get religion about Web standards,” says Zeldman, who is executive creative director at Web development firm Happy Cog Studios and publisher of A List Apart, an online magazine for Web developers.
“Microsoft deliberately ignored the standard,” says freelance Web developer and author Peter-Paul Koch, who is known for his publication of browser-compatibility tables at QuirksMode.org. Microsoft says it intends to bring event handling into compliance with the current standard but simply couldn’t get it into IE8.
Fortunately, there are known work-arounds for the event-handling issue, and it doesn’t come up often, says Koch.
Although other Web browsers’ problems pale in comparison to IE’s, Firefox, Safari, Opera and Google’s Chrome face their share of issues.
“In some cases, we supported the IE technology that the compatibility [layer] worked around but didn’t support the Mozilla properties, so we had to force the site to give us the original IE code for that functionality,” Lawson says. “This is clearly not the best way to develop cross-browser Web sites.”
No browser is 100 percent compliant with standards, says Meyer. “But they’re much, much closer than they used to be.”
Improved Web-development tools make it easier to create compliant sites. “Tools like Dreamweaver have made tremendous strides in standards support,” says Derek Featherstone, group lead for the Web Standards Project.
But Web authoring tools are just one piece of the puzzle. Other means of generating Web content, such as Microsoft Word’s ability to save a document as a Web page and the default page template used by many content management systems, aren’t always up to snuff.
“You have many automated tools — wikis, content management systems — that produce millions of pages every day. We need to make sure all of those tools provide valid markup,” says Philippe Le Hegaret, interaction domain lead at the W3C.
As they did in the bad old days of the browser wars, vendors still develop and include new features in their browsers that aren’t yet standards—and it may not always be clear to developers that what they’re embedding in their Web sites could change. In some cases, features are added to browsers and then submitted as possible standards later—a process that forces developers who implement those technologies to rework their Web sites as the specifications evolve.
For example, Apple released its Canvas design element in Safari for developers to play with and then later offered the Canvas element to W3C as a possible CSS module. The idea has been accepted, but the first working draft has yet to be created.
For its part, IE8 will include a new W3C specification called Access Control that handles cross-domain requests. But Microsoft also created XDomainRequest (XDR), a cross-domain request object that is at odds with a similar effort involving the W3C’s Access Control for Cross-Site Requests draft specification.
Wilson says developers can allow the use of both objects by writing code that switches between objects as needed.
Do such developments foreshadow a return to the browser wars? “If one of the teams starts ignoring that hard-won wisdom, we could be back where we were before,” Meyer says.
Overall, he thinks that Microsoft and other vendors are more cautious than they used to be about getting too far ahead of the curve. “To a large degree, the browser vendors have learned their lesson,” he says.
While most of the Web code out there still isn’t fully standards-compliant, most major Web sites are much better than they used to be. About 95 percent of Web sites still aren’t fully compliant with every aspect of W3C standards, but in most cases, the problems are trivial to the end-user experience and tend to be the result of a developer forgetting, say, “an escape [code], or ampersand,” says Le Hegaret.
“There are developers who are unwilling or unable to follow the specifications, there are gaps in the specifications that allow vendor-specific technology to take off, and there are parts of the existing specs that have not been implemented by all major browsers,” says Lawson. But, he adds, “I think the situation is improving.”
Developing Web standards is an ongoing process in which the goal posts keep moving all the time. They will never be perfect, nor will the Web pages that follow them, even when those pages are created by standards-aware professionals with the best of intentions.
For all of the recent gains, the open Web is still very much a work in progress, but that’s a good thing, according to Meyer. “The only time you don’t have issues to be resolved,” he says, “is when a system is closed and dead.”