When good browsers go bad -- and they all do

Better browsers. Better standards. Better tools. So why are Web pages still breaking?

1 2 3 4 5 6 Page 3
Page 3 of 6

"Once that happens -- once sites that worked fine in old versions of IE start breaking -- the unwilling will get religion about Web standards," says Jeffrey Zeldman, executive creative director of the Web development firm Happy Cog and publisher of A List Apart, a Web site for developers.

Compatibility drag

However, not all the problems in IE7 are being fixed in IE8. One example of a problem that is being carried over is the nonstandard way in which IE defines an event handler in JavaScript. In event handling, a programmer writes a script that executes in response to an event, such as a user clicking on a link on a Web page.

"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. "They said, 'OK, we have the standard, but we are not going to implement it,'" and now that same event-handling module is moving into IE8. In response, Microsoft's Wilson says, "Event handling is something we still intend to bring into compliance with the DOM standard. However, we simply couldn't get it into IE8." And he notes that there are "well-known work-arounds" that developers can use.

Fortunately, the event-handling issue doesn't come up often, says Koch. He says he's glad to see Microsoft making progress with IE8's support for CSS 2.1, and he thinks it is unreasonable to expect Microsoft to fix everything overnight.

Even so, some observers believe that Microsoft is a few steps behind competing browsers, such as Firefox, Opera and Safari. The makers of those browsers are already implementing some of the more mature modules in the emerging specifications -- including the Canvas video element in HTML 5 and Scalable Vector Graphics. Some competing browser vendors "are already implementing CSS 3 because some modules are in the candidate recommendation phase," says W3C's Le Hegaret.

Field of challengers

The four biggest competitors to IE -- Firefox, Safari, Opera and Chrome -- have their share of problems as well, but they pale in comparison to the problems surrounding IE -- particularly earlier versions such as IE6. "There are slight differences between Firefox and Safari and Chrome but they are very minor," says Koch.

But there are problems. Firefox is the No. 2 browser on the market, with a share of about 20%. While Firefox follows standards, it is not perfect. For example, Web sites may write to Firefox-specific properties, such as the Gecko DOM Range.comparePoint method and other similar events, says Bruce Lawson, Web evangelist at Opera.

No banking for you

A reporter's online banking app ran fine in IE7, Firefox, Safari and Chrome, but not Opera.

Click to view larger image.

In fact, differences in how standards have been interpreted and bugs in the implementation have created issues for Opera, he says. Lawson calls those problems "Mozilla-isms."

Opera had to resort to adding JavaScript-based hacks to work around the compatibility layer that some Web sites had created for Firefox, says Lawson. For example, Opera changed how it handled the Date.getYear() method so that it returned a full year when the year was > 1999 or < 1900.

It did this for cross-browser compatibility, "despite breaking the JavaScript spec," Lawson explained. Opera changed it, breaking the spec in version 9.5, because, Lawson says, "Mozilla and Apple got it wrong and it was breaking many pages -- mostly airline calendar widgets.

"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. This is clearly not the best way to develop cross-browser Web sites."

1 2 3 4 5 6 Page 3
Page 3 of 6
9 steps to lock down corporate browsers
  
Shop Tech Products at Amazon