The permissionState() method on PushManager returns the push permission state as prompt, denied, or granted. Learn the MDN serviceWorker.ready pattern, the userVisibleOnly option, replacing deprecated hasPermission(), and updating subscribe UI—with five examples and try-it labs.
01
Kind
Instance method
02
Returns
Promise
03
Values
prompt / denied
04
Options
userVisibleOnly
05
Replaces
hasPermission
06
Status
Baseline Mar 2023
Fundamentals
Introduction
Before calling subscribe(), your PWA should know whether push is allowed, blocked, or not yet decided. The Push API exposes permissionState() on PushManager for that check—the modern, standardized way to read push permission.
MDN marks it Baseline Widely available (since March 2023). It superseded the deprecated hasPermission() method and maps legacy default to prompt. In Firefox, notification and push permissions are merged—granting notifications also enables push.
💡
Permission vs subscription
permissionState() tells you if push is allowed. getSubscription() tells you if the user already has an active PushSubscription. Check both on page load.
Concept
Understanding permissionState()
An instance method on PushManager that queries push permission asynchronously for the given subscribe options.
Parameters — optional options object.
userVisibleOnly — boolean; push messages must be user-visible.
applicationServerKey — VAPID public key (same as for subscribe()).
Returns — Promise<string>.
granted — push permission allowed.
denied — push permission blocked.
prompt — user has not decided yet.
Available in Web Workers per MDN (secure context).
The PushManager.permissionState() method is Baseline Widely available on MDN (since March 2023). Requires a secure context. Logos use the shared browser-image-sprite.png sprite from this project.
✓ Baseline · Widely available
PushManager.permissionState()
Check push permission as prompt, denied, or granted in modern browsers.
UniversalWidely available
Google ChromeFull support · Desktop & Mobile
Full support
Mozilla FirefoxFull support · Desktop & Mobile
Full support
Apple SafariFull support · macOS & iOS
Full support
Microsoft EdgeFull support · Chromium
Full support
OperaFull support · Modern versions
Full support
Internet ExplorerNo Push API / service workers
Not supported
permissionState()Excellent
Bottom line: Call after serviceWorker.ready with the same options you use for subscribe().
Wrap Up
Conclusion
pushManager.permissionState() is the modern way to read push permission as prompt, denied, or granted. Call it after serviceWorker.ready with the same options you use for subscribe()—then update your UI or proceed to subscription.
It returns a Promise that resolves to a permission string: "prompt", "denied", or "granted"—indicating whether push messages are allowed for the given options.
No. MDN marks PushManager.permissionState() as Baseline Widely available (since March 2023). It is not Deprecated, Experimental, or Non-standard.
An optional object with userVisibleOnly (boolean) and applicationServerKey (VAPID public key). Pass the same options you plan to use with subscribe().
granted means push is allowed; denied means blocked; prompt means the user has not decided yet (a permission dialog may appear when subscribing).
permissionState() is the modern, standardized replacement. It uses "prompt" instead of legacy "default" and accepts subscribe options like userVisibleOnly.
On registration.pushManager after navigator.serviceWorker.ready, in a secure context (HTTPS or localhost). Also available in Web Workers per MDN.
Did you know?
MDN maps legacy default from hasPermission() to prompt in permissionState()—both mean the user has not made a permission choice yet.