Pinned site notifications in Windows 8
Windows Internet Explorer 9 introduced pinned sites, a convenient way for users to access your website directly by clicking an icon on the taskbar. Pinned sites are easy to implement, too, requiring very little code. For more information about creating pinned sites, see Pinned Sites Developer Documentation.
Windows 8 implements pinned sites by using tiles on the Start screen. When a user clicks the tile of a pinned site, the site opens in Internet Explorer 10 in the new Windows UI environment. Here you learn how to implement a pinned site notification in Windows 8.
You must provide several pieces of information to correctly implement pinned site notifications in Windows 8:
- The location of the web service to poll for notifications
- An up-to-date XML file that reflects the current badge state
- The frequency with which updates should occur
The new meta tag for pinned sites describes the polling URL. A typical meta tag is shown here:
<meta name="msapplication-badge" content="frequency=30; polling-uri=http://mysite.com/id45453245/polling.xml"/>
The name value "msapplication-badge" is required and indicates that the website supports badge notifications when pinned to the Start screen.
The content value "frequency" is optional, and indicates the frequency, in minutes, that a client should check for updates to the polling URL. The supported values are 30, 60, 360 (6 hours), 720 (12 hours), and 1440 (1 day). If no value is specified, the default value of 1440 hours is used.
The content value "polling-uri" is required and indicates the URL to poll for the XML data file. Only "http" and "https" URI schemes are supported.
A badge notification can update your pinned site tile with a number from 1 to 99, or one of 10 standard glyphs. For an illustrated list of badge images, see The badge image catalog (Windows Store apps). This next XML example describes a badge that indicates that a new message has arrived.
The following XML adds a numeric badge.
For a complete description of XML values, glyphs, and examples, see Badge schema.
Internet Explorer 10 introduces an API that you can use to request that Windows poll the pinned site’s notification state on demand:
For instance, when a user is actively browsing your website, you might want to update the pinned site’s notification badge more often. You might also want to do this when the website is opened to refresh the badge status.
Build date: 4/8/2013