Browser Notifications with Yip
![]()
Ever wanted your web application to be able to show notifications even if the user may be in another browser tab or application? Now you can!
The relatively new Yip extension for Firefox adds notification functionality. This is not a small JavaScript notification that pops up in the browser tab, but one that integrates directly with the users Operating System.
Yip uses libnotify/notify-osd on Ubuntu Linux, Growl on Mac, and Snarl or Growl for Windows on Windows. If none of these notification applications are installed, it will use Firefox's simple and not as pretty notification system. Ubuntu Linux users have notify-osd installed by default, Growl is popular with Mac users, yet Windows users probably don't have Snarl or Growler for Windows installed.
When building with notifications remember that they are meant to enhance the user experience, not require it.
The Yip extension supports both the Fluid and Prism APIs, but recommends Fluid because of support for an onclick callback function.
The API is simple and straight to the point:
-
window.fluid.showGrowlNotification({
-
title: "your notification title",
-
description: "some description",
-
onclick: optionalCallbackFunction,
-
icon: "URL to an icon"
-
});
Since Yip may not be installed on the users computer, just wrap it with a check for fluid. A complete example looks like this:
-
if (typeof(fluid) !== 'undefined') {
-
window.fluid.showGrowlNotification({
-
title: "Hello World",
-
description: "The Google icon says Hi",
-
icon: "http://www.google.com/favicon.ico"
-
});
-
}
Related Projects
- Roar: Embed notifications into a web page (powered by MooTools).
- growl.js: Windows only notifications using Growl for Windows.
- NotificationAPI: Notifications in Google Gears
Of all these options, Yip is the best solution by far; its fully cross platform, has a simple to use API, and is ready to use. Install Yip now.

August 11th, 2009 at 8:14 pm
Hey Mark, Thanks for writing about Yip. It’s actually not true that the user “must have one of these client notification library installed.” If Yip cannot find any external notification systems, it will simply use Firefox’s own (ugly) notification systems. Screenshot – http://cache.gawker.com/assets/images/17/2009/06/340x_sshot-2009-06-11-_4_.jpg
I’ll also be improving these in-Firefox notifications and possibly, even add a patch to Firefox.
August 11th, 2009 at 9:20 pm
Excellent, thanks for clarifying. I’ll update my post because it makes the case for using Yip even stronger.