Microsoft details Edge Web Notifications implementation

On the Windows Blog Microsoft has revealed details of the Web Notifications in Edge in Windows 10 Anniversary update.

Web notifications will be available to all Microsoft Edge customers in EdgeHTML 14 and allow sites to display notifications to alert users outside the context of the webpage and the browser, keeping users informed of new messages or alerts and allowing sites to improve user engagement.

The Web Notifications in Edge integrated with the notification platform and Action Center in Windows 10 and are based on the W3C Web Notifications specification, now supported broadly across modern desktop browsers.

Microsoft Edge also supports the event model as defined by the W3C spec, including all the show, click, close, and error events. Notifications can only be displayed if the user has granted permission to the specific domain sending the notification.

When a user visits a website that uses the Web Notification API, Microsoft Edge will prompt the user for permission to show notifications.

Once granted permission, the website will be allowed to send desktop notifications – in the Skype example shown above, the site will send notifications for each incoming call and each incoming IM. These settings persist when visiting the same website domain again – users can manage permissions per domain at any time under the Advanced Settings menu.

When the user clicks on an on-screen notification, Microsoft Edge brings the corresponding window and tab into focus, and the webpage will receive the corresponding click event and can update accordingly. On-screen notifications that are not clicked or not closed immediately by the user will be minimized to the Windows Action Center, where they are grouped under the “Microsoft Edge” heading in chronological order.

When the user clicks on a notification in the Action Center, Microsoft Edge will launch a tab and navigate to the corresponding origin of the notification. Since the notifications are not persistent, no event is fired to the webpage. When a notification initially originated from an iframe, Microsoft Edge will open a tab based on the domain of the top-level parent page.

Notifications can be disabled for a domain or for all of Microsoft Edge in Action Center simply by right-clicking on a notification.

Notifications that originate from sites in an InPrivate window will not be stored in Action Center, and permission settings for those domains will not be saved after each session.

In the future Microsoft plans to add additional features to further improve user control and notification fidelity and later to group notifications in the Action Center based on website domains, to preserve the site context of each notification.

It is of note that currently both Edge and the web page originating the notification needs to be open to receive notifications.

Microsoft is currently exploring support for Service Workers and Push API in the EdgeHTML platform, with the potential for notifications when the browser is not active or the origin webpage is not loaded.

Once Service Workers are available notification support on Windows 10 Mobile devices should also follow.