I had heard through the grapevine that Apple would be posting a set of HTML5 demos today. To be honest I was kind of looking forward to seeing some cool stuff. Instead they have presented a set of basic demos that have very little to do with HTML5 or web standards. On top of that they have implemented a browser-detection scheme that is quite deceptive to say the least.

The image below was circulated on Twitter and it shows that on Apple’s demo page you are unable to view the examples using Google Chrome, Opera, Firefox or any other browser and are instead asked to download and install Safari in order to see the demos. That is quite odd seeing as though Chrome has much better support for the future HTML5 standard according to the site html5test.com.

In an ironic and funny side note, the browser sniffing was apparently blocking people from viewing the demos on their iPhone, although I can’t confirm that. The performance of the demos on the iPhone may have something to do with that, as most of the demos crawled on my 3GS.

If you go to the developer section of Apple’s website you can view the demos using Chrome and are not directed to download Safari. So on to the demos themselves. I made a joke on Twitter about how these were equivalent to things created in Flash 8, but to be honest that is being kind. A photo slideshow and 360° PNG sequence are more like Flash 5. The reality is that HTML5 is capable of much more than that so it is odd that they considered these to be a good showcase of what is possible. Apple should really consider hiring some Flash developers to create some badass HTML5 demos. Many in the community have been dabbling in it and have created much more impressive demos than these.

Other browser manufacturers have rightfully jumped up to dispute Apple’s questionable browser-sniffing policy. Opera’s Haavard Moen blogged that

“when the page doesn’t work in Opera or other browsers it isn’t because these browsers don’t support HTML5. It’s because Apple uses browser sniffing and vendor prefixes, and in addition to that they aren’t really testing a lot of HTML5 at all. Most of their demos seem to have got nothing to do with HTML5, as a matter of fact.”

Christopher Blizzard from Firefox was more direct saying

“Apple’s messaging is clearly meant to say ‘hey, we love the web’ but the actual demos they have and the fact that actively block other browsers from those demos don’t match their messaging. It’s not intellectually honest at all.”

A quick review of the source code shows that it is littered with WebKit-specific prefixes and extensions. The messaging surrounding the demos is also iffy at best. In the Light Table demo, which is actually pretty nice, the messaging states that

“Using CSS3 transforms and transitions, photos can be easily sorted, shuffled, or displayed in a slideshow with just a few lines of CSS and JavaScript.”

Of course I was curious as to the contents of those 3 lines as they must be the most powerful 3 lines of code ever written. In actual fact, the JavaScript file that drives the demo is 700 lines long.

Personally I look forward to the day when simple things like video playback and photo galleries can be handed off to browsers to handle. Flash has always been about pushing the envelope. So long as there are standards, there will always be technologies and developers who want to go beyond that.