---
title: "Badging for Home Screen Web Apps"
description: "WebKit on iOS and iPadOS 16.4 supports the W3C Badging API, but only for web apps added to the Home Screen."
url: "https://swe.quest/articles/badging-for-home-screen-web-apps-42741870aac64b42"
canonical: "https://webkit.org/blog/14112/badging-for-home-screen-web-apps/"
source: "WebKit"
published: "2023-04-25"
difficulty: "medium"
kind: "How-to"
reading_minutes: 4
tags: ["browsers","mobile","javascript","frontend"]
---

# Badging for Home Screen Web Apps

A post on [WebKit](https://swe.quest/sources/webkit.md), published 2023-04-25, 4 min read, How-to. Original: [https://webkit.org/blog/14112/badging-for-home-screen-web-apps/](https://webkit.org/blog/14112/badging-for-home-screen-web-apps/)

## Summary

WebKit on iOS and iPadOS 16.4 supports the W3C Badging API, but only for web apps added to the Home Screen. It is not exposed in Safari or WKWebView. Badges appear only after the user grants notification permission, and users can still hide badges in Settings without the app being told. The post shows feature detection, requesting and checking notification permission, \`navigator.setAppBadge()\` and \`clearAppBadge()\`, and updating badges from a Service Worker on push events. A badge update alone does not satisfy the user-visible notification requirement, and calls from cross-origin frames are ignored.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Browsers](https://swe.quest/tags/browsers.md) (Web & mobile)
- [Mobile](https://swe.quest/tags/mobile.md) (Web & mobile)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)

## Prerequisites

- JavaScript promises ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- Service Workers
- Web Push basics

## Keywords

Badging API, WebKit, iOS 16.4, Web Push, Service Worker, W3C, Notifications API, Permissions API

## Related posts

- [Web Push for Web Apps on iOS and iPadOS](https://swe.quest/articles/web-push-for-web-apps-on-ios-and-ipados-7478bb28f95c6572.md): WebKit · 2023-02-16 · Medium · 7 min read · Browsers, Mobile, Communications, Frontend
  iOS and iPadOS 16.4 beta 1 adds standards-based Web Push for Home Screen web apps, using the Push API, Notifications API and Service Workers over Apple Push Notification service, with no Apple Developer Program membership required (allow \*.push.apple.com).
- [Meet Web Push](https://swe.quest/articles/meet-web-push-bf0c9724c735ad8d.md): WebKit · 2022-06-07 · Easy · 4 min read · Browsers, Communications, Frontend
  Safari 16 on macOS Ventura supports Web Push through the W3C Push API, Notifications API and Service Workers, with iOS and iPadOS support planned for 2023.
- [WebKit Features in Safari 16.1](https://swe.quest/articles/webkit-features-in-safari-16-1-3a59f2af760879c3.md): WebKit · 2022-10-24 · Medium · 7 min read · Browsers, Identity & auth, CSS, Frontend
  Safari 16.1 brings Web Push to macOS Ventura using the standard Push API, Notifications API and Service Workers, delivered via Apple Push Notification service.
- [News from WWDC22: WebKit Features in Safari 16 Beta](https://swe.quest/articles/news-from-wwdc22-webkit-features-in-safari-16-beta-74211827dca49267.md): WebKit · 2022-06-06 · Easy · 7 min read · Browsers, CSS, Frontend, Accessibility, Developer tools
  Safari 16 beta adds Container Queries (size queries plus cqw/cqh/cqi/cqb/cqmin/cqmax units), CSS Subgrid, Web Push on macOS Ventura via the standard Push API, Notifications API and Service Worker backed by Apple Push Notification service, and Shared Workers.
- [Meet Declarative Web Push](https://swe.quest/articles/meet-declarative-web-push-95ed121c13509f32.md): WebKit · 2025-03-27 · Medium · 9 min read · Browsers, Privacy, Communications, Frontend
  Declarative Web Push lets sites subscribe via window.pushManager and send a standardized JSON payload (keyed by "web\_push": 8030 with a required title and navigate URL) that the browser displays as a notification without any service worker JavaScript.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
