Google Chrome is planning to implement “Badging API, a proposed Web Platform API allowing websites to apply badges (small status indicators) to pages or sets of pages on their origin”. This will add notification badges similar to Windows and iOS to apps and websites.
Remember those notification badges on your phone or laptop?:
Google Chrome is considering adding such notification icons to Chrome tabs. If I am reading the proposal correctly, we will see those icons for:
- Chrome tabs
- Installed web apps and PWAs.
Here is a mock image from the git project page:
Here is an example mock image with the badge on a bookmark icon:
The document also says that “for installed web applications, the badge can be applied in whatever place the OS shows apps, such as the shelf, home screen or dock.” This means you will see those icons on app menus and taskbars, wherever you put a shortcut to the web app.
Will it Show Unread Notifications Count?
Looks like it will. Let me quote the document:
“The simplest possible usage of the API is a single call to Badge.set from a foreground context (which might be used to show an unread count in an email app)”.
Developers will be able to show either an unread count or just an indicator that there is a notification:
“If you just want to show a status indicator flag without a number, use the Boolean mode of the API by calling Badge.set without an argument, and Badge.clear (which might be done to indicate that it is the player’s turn to move in a multiplayer game):”
Refresh in Background
The design document also explains that the notification count can update in the background even when no page is open from the app or website:
“For the handle context badges, we would like to be able to update the badge with a server-side push, while there are no active documents open. This would allow, for example, app icon badges to show an up-to-date unread count even when no pages are open.”
If you are a web or app developer, I highly recommend going through these pages: