Desktop notifications for web applications is a great plus, the user can be notified irrespective of the current window/tab they are using. Chrome, which has the largest share of the browser market, supports desktop notification, also Safari, or any webkit based browser. You can easily implement it you web applications, like mail clients (GMail has this feature), CRMs, Stock Market apps, and anything you can think may use this feature. All you need to some JavaScript and a server side script to send updates, or you can do without the server part also. Now, let's get our hands dirty with some desktop notification code. Implementing Desktop notifications on Webkit based browsers Try this on Chrome/Safari, first time a popup will appear asking for permission. Code: if (window.webkitNotifications) { // check if browser has support var has_perm = window.webkitNotifications.checkPermission(); // check if permission granted if (has_perm == 0) { // 0 means has permission to show desktop notification var notification = window.webkitNotifications.createNotification( 'http://g4e.com/logo.png', 'Welcome!', 'Here is the notification' ); notification.show(); } else { window.webkitNotifications.requestPermission(); } } Additionally, you may also control what happens when the notification is clicked. Google recently launched a Rich Desktop notification where one can control the style elements of the notification body, that we'll cover in some other article in the future.
The same can be done for Firefox (though experimental like Chrome) as well and it need not be only for Chrome. https://developer.mozilla.org/en/docs/Web/API/notification