Web Notifications API Hints at a Brave New Real-Time Web

Share

Web Notifications API Hints at a Brave New Real-Time Web

Google recently added a desktop notification option to Gmail – whenever a new message arrives you'll see a pop-up window letting you know. Gmail's new feature works a bit like the popular OS X app Growl. it's handy, but there's a big catch – it only works in Google's Chrome browser.

The Web Notifications API attempts to bring the world of desktop notifications to the web, with the browser serving as an intermediary. The web solved the real-time updates problem some time ago. Take Twitter, for instance, the website offers a continuously updated feed of your friends' tweets in real-time. But, all the updates in world are meaningless if you don't know they've arrived.

The next step forward in the real-time web is to move from real-time updates to real-time notifications. Right now one of the biggest advantages of using – to stick with the Twitter example – a desktop Twitter client, is that it can run in the background, popping up alerts whenever you receive new messages. Twitter.com running in your browser can't pull that off right now.

But that's precisely what the Web Notifications API will allow websites to do. The API provides a mechanism for web apps to talk to your desktop, passing along notifications from sites you've authorized to send updates. The spec does not specify exactly how to display the notifications, that's left up to the user agent since what works best on your desktop might not work so well on your Android phone.

The possible applications go well beyond Twitter and e-mail. Attempts to build distributed social networks could benefit from real-time notifications, as would chat apps, news alert apps, banking apps and countless others. Combining the advantages of the web – accessible nearly anywhere with no app store restrictions – with a cross-platform notification standard just might open up a new realm of web apps.

While the Web Notifications API is still a draft, Google's Chrome browser has already embraced it and the spec has managed to progress from editor's draft to public draft in just eight months, which is near lightning speed for the W3C. Now it's time for other browsers to start adding support for the Web Notifications API so developers can begin to experiment.