About Notifications for Websites

Notifications are concise, unobtrusive messages that appear in the top-right corner of the screen, alerting Mac users about a new message or a completed task. As a web developer, you can configure your website to send notifications to Mac users, even if you don’t have a native Cocoa app.

Figure I-1  Notifications in Notification Center

There are two kinds of notifications for websites:

At a Glance

This document explains the key concepts of notifications for websites and how to implement them in your ecosystem.

Users Control Their Notifications

Review the preferences available to users to better understand how to implement your notification service.

Safari Push Notifications Are Deployed from Your Server

In OS X v10.9 and later, you can send push notifications to your website users. Safari doesn’t need to be open for the notification to appear, and your visitors have control over their notification settings on a per-website basis.

Local Notifications Are Invoked with JavaScript

In OS X v10.8 and later, you can tap into Notification Center through a JavaScript API. After visitors grant permission to receive local notifications, you can trigger notifications to appear as long as the webpage remains in an open tab.

See Also