Apple's HTML5 promotion may backfire

Apple's latest attempt to show off the HTML5 features of its newest Safari browser does more harm than good

Given all the hype, it's easy to forget that HTML5 is not yet a finalized Web standard. That hasn't stopped Apple from posting a site featuring demonstrations of various capabilities of HTML5 and its related technologies, including CSS3. The catch? As long as HTML5 and CSS3 remain draft specifications, you'll need Apple's Safari browser to view any of the demos.

The move has angered many in the Web standards community who claim Apple's campaign actually undermines the very thing it claims to support: free and open Web standards. In a heated blog post, Mozilla evangelist Christopher Blizzard blasted Apple for being "not intellectually honest" in its marketing, by making it sound as if only Safari supports HTML5 today.

[ InfoWorld's Neil McAllister explains what to expect in HTML5. | Stay up to date on key software development trends in InfoWorld's Developer World newsletter. ]

Apple has stepped up its promotion of HTML5 in recent weeks, offering the forthcoming standard as an alternative to the multimedia capabilities of Adobe's Flash plug-in, which Apple refuses to support on its iPhone and iPad devices. But according to Blizzard, "The most important aspect of HTML5 isn't the new stuff like video and canvas (which Safari and Firefox have both been shipping for years) it's actually the honest-to-God promise of interoperability." By creating HTML5 pages that can only be viewed in one browser, he says, Apple is doing the entire Web standards movement a disservice.

Return to the bad old days
Many of Apple's demos rely on "experimental" CSS3 properties to work. The exact implementation of these properties has yet to be hammered out, so browser vendors must use their best guess to determine how they should be rendered onscreen. Because of the ambiguity this introduces, it is the custom for browser vendors to attach a vendor-specific prefix to the CSS property names. Firefox uses "moz," while Safari uses "webkit," named for the browser's WebKit rendering engine.

This means Web developers who want to use a specific experimental CSS feature must include the vendor-specific properties for each browser they want to support in their style sheets. It's a less than ideal situation, but the actual coding required is trivial. Apple chose not to bother for its HTML5 demo site.

That would be bad enough. But Apple's demos don't work on Google's Chrome browser, either -- and Chrome also uses the "webkit" prefix for its experimental CSS3 properties (because it's also based on the WebKit rendering engine). Rather than detecting browser capabilities and degrading the user experience gracefully where features aren't supported -- as is the accepted best practice on modern browsers -- Apple chose to deliberately screen out any browser that doesn't self-identify as Safari.

That's right: By forcing my browser's user agent string to identify as Safari 5, I was able to view many of the demos just fine in Firefox 3.6 on Windows. Seriously, Apple? I thought we left elaborate browser-detection scripts behind in the bad old days of the 1990s. I can't imagine anyone would want to start up the practice again, let alone one of the leading companies in the development of next-generation Web standards.

Browser vendors knock heads
But then, if Apple chooses to offer its demos only to users of its own products, is that really such a bad thing? Competition seems to have done a lot for the browser market in the last few years. For example, JavaScript performance -- once seen as almost an afterthought -- has improved by leaps and bounds since Google entered the market with Chrome. One could argue that competitive pressures are the very reason HTML5 has come this far, this soon.

1 2 Page
From CIO: 8 Free Online Courses to Grow Your Tech Skills
Join the discussion
Be the first to comment on this article. Our Commenting Policies