This feature is not Baseline because it does not work in some of the most widely-used browsers.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The clearAppBadge() method of the Navigator interface clears a badge on the current app's icon by setting it to nothing. The value nothing indicates that no badge is currently set, and the status of the badge is cleared.
clearAppBadge()
None.
A Promise that resolves with undefined.
InvalidStateError DOMException
Thrown if the document is not fully active.
SecurityError DOMException
Thrown if the call was blocked by the same-origin policy.
NotAllowedError DOMException
Thrown if PermissionStatus.state is not granted.
Once all messages in an application have been read, call clearAppBadge() to clear the badge and remove the notification.
navigator.clearAppBadge();
| Specification |
|---|
| Badging API> # clearappbadge-method> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
clearAppBadge |
81["Windows and macOS since Chrome 81.", "ChromeOS since Chrome 91.", "Linux offers no universal badging API on the operating system level."] |
81["Windows and macOS since Edge 81.", "ChromeOS since Edge 91.", "Linux offers no universal badging API on the operating system level."] |
No | No | 17Badging is supported for installed web apps on macOS Sonoma and higher. |
81 | No | 58 | 16.4Badging is supported for web apps saved to the home screen. |
13.0 | 81 | NoBadging is supported for web apps saved to the home screen. |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/clearAppBadge