{
  "slug": "web-push",
  "name": "Web Push",
  "category": "Engagement",
  "summary": "Server-sent push messages delivered via the Push API + service worker, even when the app is closed.",
  "name_zh": "Web Push（网页推送）",
  "summary_zh": "通过 Push API 与 Service Worker 投递服务器推送消息，即使应用已关闭。",
  "spec_url": "https://www.w3.org/TR/push-api/",
  "mdn_url": "https://developer.mozilla.org/en-US/docs/Web/API/Push_API",
  "confidence": "medium",
  "verified_at": "2026-10-20",
  "support": [
    {
      "target": "Chrome (Desktop)",
      "os": "Desktop",
      "browser": "chrome",
      "engine": "blink",
      "status": "yes",
      "version_added": "42",
      "version_full": "42",
      "applicable": true,
      "notes": [
        {
          "text": "The `options` parameter with a `applicationServerKey` value is required.",
          "text_zh": "必须传入带 `applicationServerKey` 值的 `options` 参数。"
        }
      ],
      "source": "https://raw.githubusercontent.com/mdn/browser-compat-data/main/api/PushManager.json",
      "verified_at": "2026-10-20",
      "confidence": "high"
    },
    {
      "target": "Chrome (Android)",
      "os": "Android",
      "browser": "chrome",
      "engine": "blink",
      "status": "yes",
      "version_added": "42",
      "version_full": "42",
      "applicable": true,
      "notes": [
        {
          "text": "The `options` parameter with a `applicationServerKey` value is required.",
          "text_zh": "必须传入带 `applicationServerKey` 值的 `options` 参数。"
        },
        {
          "text": "Derived by browser-compat-data mirroring from Chrome.",
          "text_zh": "由 browser-compat-data 镜像自 Chrome 的数据推导。"
        }
      ],
      "source": "https://raw.githubusercontent.com/mdn/browser-compat-data/main/api/PushManager.json",
      "verified_at": "2026-10-20",
      "confidence": "high"
    },
    {
      "target": "Edge (Desktop)",
      "os": "Desktop",
      "browser": "edge",
      "engine": "blink",
      "status": "yes",
      "version_added": "17",
      "version_full": "17",
      "applicable": true,
      "notes": [
        {
          "text": "The `options` parameter with a `applicationServerKey` value is required.",
          "text_zh": "必须传入带 `applicationServerKey` 值的 `options` 参数。"
        }
      ],
      "source": "https://raw.githubusercontent.com/mdn/browser-compat-data/main/api/PushManager.json",
      "verified_at": "2026-10-20",
      "confidence": "high"
    },
    {
      "target": "Firefox (Desktop)",
      "os": "Desktop",
      "browser": "firefox",
      "engine": "gecko",
      "status": "yes",
      "version_added": "44",
      "version_full": "44",
      "applicable": true,
      "notes": [
        {
          "text": "From Firefox 72 onwards, can only be called in response to a user gesture such as a `click` event.",
          "text_zh": "从 Firefox 72 起，只能在响应用户手势（例如 `click` 事件）时调用。"
        }
      ],
      "source": "https://raw.githubusercontent.com/mdn/browser-compat-data/main/api/PushManager.json",
      "verified_at": "2026-10-20",
      "confidence": "high"
    },
    {
      "target": "Firefox (Android)",
      "os": "Android",
      "browser": "firefox",
      "engine": "gecko",
      "status": "yes",
      "version_added": "48",
      "version_full": "48",
      "applicable": true,
      "notes": [
        {
          "text": "From Firefox Android 79 onwards, can only be called in response to a user gesture such as a `click` event.",
          "text_zh": "从 Firefox Android 79 起，只能在响应用户手势（例如 `click` 事件）时调用。"
        }
      ],
      "source": "https://raw.githubusercontent.com/mdn/browser-compat-data/main/api/PushManager.json",
      "verified_at": "2026-10-20",
      "confidence": "high"
    },
    {
      "target": "Safari (macOS)",
      "os": "macOS",
      "browser": "safari",
      "engine": "webkit",
      "status": "yes",
      "version_added": "16",
      "version_full": "16",
      "applicable": true,
      "notes": [
        {
          "text": "Notifications are supported on macOS Ventura and later.",
          "text_zh": "macOS Ventura 及更高版本支持通知。"
        }
      ],
      "source": "https://raw.githubusercontent.com/mdn/browser-compat-data/main/api/PushManager.json",
      "verified_at": "2026-10-20",
      "confidence": "high"
    },
    {
      "target": "Safari (iOS)",
      "os": "iOS",
      "browser": "safari",
      "engine": "webkit",
      "status": "yes",
      "version_added": "16.4",
      "version_full": "16.4",
      "applicable": true,
      "notes": [
        {
          "text": "Notifications are supported in web apps saved to the home screen.",
          "text_zh": "添加到主屏幕的 Web 应用支持通知。"
        }
      ],
      "source": "https://raw.githubusercontent.com/mdn/browser-compat-data/main/api/PushManager.json",
      "verified_at": "2026-10-20",
      "confidence": "high"
    },
    {
      "target": "Samsung Internet",
      "os": "Android",
      "browser": "samsung",
      "engine": "blink",
      "status": "yes",
      "version_added": "4.0",
      "version_full": "4.0",
      "applicable": true,
      "notes": [
        {
          "text": "The `options` parameter with a `applicationServerKey` value is required.",
          "text_zh": "必须传入带 `applicationServerKey` 值的 `options` 参数。"
        },
        {
          "text": "Derived by browser-compat-data mirroring from Chrome Android.",
          "text_zh": "由 browser-compat-data 镜像自 Chrome Android 的数据推导。"
        }
      ],
      "source": "https://raw.githubusercontent.com/mdn/browser-compat-data/main/api/PushManager.json",
      "verified_at": "2026-10-20",
      "confidence": "high"
    },
    {
      "target": "WebView (Android)",
      "os": "Android",
      "browser": "webview",
      "engine": "blink",
      "status": "no",
      "version_added": null,
      "version_full": null,
      "applicable": true,
      "notes": [
        {
          "text": "No WebView Android support is recorded in browser-compat-data.",
          "text_zh": "browser-compat-data 未记录 WebView Android 的支持。"
        }
      ],
      "source": "https://raw.githubusercontent.com/mdn/browser-compat-data/main/api/PushManager.json",
      "verified_at": "2026-10-20",
      "confidence": "high"
    },
    {
      "target": "Safari (iOS) · Declarative Web Push",
      "target_zh": "Safari（iOS） · 声明式 Web Push",
      "os": "iOS",
      "browser": "safari",
      "engine": "webkit",
      "status": "yes",
      "version_added": "18.4",
      "version_full": "18.4",
      "applicable": true,
      "notes": [
        {
          "text": "WebKit's Safari 18.4 post: \"Declarative Web Push is now available on iOS and iPadOS 18.4 for web apps added to the Home Screen.\" It describes Declarative Web Push as push notifications that can display without requiring a service worker.",
          "text_zh": "WebKit 的 Safari 18.4 文章写道：\"Declarative Web Push is now available on iOS and iPadOS 18.4 for web apps added to the Home Screen.\"（译文：声明式 Web Push 现已在 iOS 与 iPadOS 18.4 上提供给添加到主屏幕的 Web 应用。）文章把声明式 Web Push 描述为不需要 service worker 也能显示的推送通知。"
        },
        {
          "text": "browser-compat-data has no Declarative Web Push entry. Its nearest key, `api.Window.pushManager`, records Safari on iOS 18.4 and is marked experimental.",
          "text_zh": "browser-compat-data 没有声明式 Web Push 的条目。最接近的键 `api.Window.pushManager` 记录 iOS 版 Safari 18.4 起支持，并标记为实验性。"
        },
        {
          "text": "OpenPWA device test, 2026-10-20, iPhone 16 Pro, iOS 18.6.2 (22G100): `window.pushManager` is also exposed in a plain Safari tab; in a Home Screen app whose service worker is scoped to a subpath, `window.pushManager.getSubscription()` returned `null` while the worker's registration held a subscription, consistent with WebKit's statement that only a root-scoped worker shares the window's subscription.",
          "text_zh": "OpenPWA device test, 2026-10-20, iPhone 16 Pro, iOS 18.6.2 (22G100)：普通 Safari 标签页中同样暴露 `window.pushManager`；在 Service Worker 作用域为子路径的主屏应用中，worker 的注册已有订阅，`window.pushManager.getSubscription()` 却返回 `null`，与 WebKit「只有根作用域的 worker 与 window 共享订阅」的说法一致。"
        }
      ],
      "source": "https://webkit.org/blog/16574/webkit-features-in-safari-18-4/",
      "verified_at": "2026-10-20",
      "confidence": "medium"
    }
  ],
  "biz_compat": [
    {
      "entity": "Apple Push (APNs)",
      "type": "delivery_policy",
      "status": "partial",
      "context": "iOS",
      "notes": [
        {
          "text": "iOS Web Push requires the user to add the app to the Home Screen first.",
          "text_zh": "iOS 上的 Web Push 要求用户先把应用添加到主屏幕。"
        }
      ],
      "source": "https://developer.apple.com/documentation/usernotifications/sending-web-push-notifications-in-web-apps-and-browsers",
      "sponsored": false
    }
  ],
  "generated_by": "OpenPWA compatibility explorer",
  "licence": "CC BY 4.0",
  "licence_url": "https://creativecommons.org/licenses/by/4.0/",
  "attribution": "OpenPWA — https://openpwa.net",
  "attribution_html": "<a href=\"https://openpwa.net\">OpenPWA</a>, <a href=\"https://creativecommons.org/licenses/by/4.0/\">CC BY 4.0</a>"
}