This guide explains how to manage web push subscriptions and how subscription status is affected by both user action and browser behavior.Documentation Index
Fetch the complete documentation index at: https://documentation.onesignal.com/llms.txt
Use this file to discover all available pages before exploring further.
Understand push permissions
Users must give your website permission to send them push notifications. It is not possible to receive push notifications without explicitly granting the site permission using the system-level permission prompt.
- Default: permission has not been granted to denied.
- Granted: you allowed the website to send you notifications.
- Denied: you blocked the website to send you notifications. This can be a temporary block if you clicked the x to close the prompt repeatedly or a permanent block if you clicked Block or toggled off permission in the browser settings.
How to unsubscribe from web notifications
You can unsubscribe from web push notifications in three ways:Unsubscribe within browser settings
You can manage or remove notification permissions directly in browser settings. Here are quick-access URLs and official docs to learn more:- Chrome:
chrome://settings/content/notifications(Learn more on Chrome’s docs) - Edge:
edge://settings/content/notifications(Learn more on Microsoft’s docs) - Firefox:
about:preferences#privacyscroll to Permissions > Notifications > Settings (Learn more on Mozilla’s docs) - Safari: Settings > Websites > Notifications (Learn more on Safari’s docs)
Unsubscribe while on the website
Reset permission Most browsers have a “lock” or “settings” icon next to the URL. Clicking it reveals site-specific permissions where users can disable push notifications.

Deleting browser data, clearing cookies and site data
If you delete history and/or delete your cookies and site data, it will temporarily prevent notifications from showing. However, if you don’t remove push permissions from the site, you may be automatically re-subscribed and start getting notifications again upon returning to the site.

How to test your permission prompts
These steps explain how to test your prompt and subscription flow like a first time visitor.Visit your site with the OneSignal SDK setup.
Reset push permissions

Delete site data.


Follow the steps needed to prompt for push notifications and on the required system-level permission prompt, select "Allow".

Check the console for any errors.
Get subscription ID
OneSignal.User.PushSubscription.id- This will log your OneSignal subscription ID. Copy-paste this into your OneSignal Dashboard Audience > Subscriptions tab.
- If a subscription ID was not logged in the console, then you are not successfully subscribed. Please see Web SDK troubleshooting for details.


Next to the subscription, select the 3-dot options button and "Add to Test Users". Then name and date the test user so it is recognizable."

Navigate to Messages > Push > New Message > New Push and on the Push create form add a Message.

You should receive the push you tested.

- Web push setup - additional non-developer web setup steps.
- Web SDK setup - developer web SDK setup steps.
- Web SDK troubleshooting - troubleshooting if you see errors in the console or not getting a subscription ID.
- Web push: Notifications not shown - troubleshooting notifications not displaying on your device.
Receiving Notifications When the Browser is Closed
Browsers behave differently across platforms. Please refer to the table below for support for receiving notifications even when the browser is closed.| Browser Name | Android | Windows | macOS |
|---|---|---|---|
| Chrome / Chromium | Yes | Yes | No |
| Firefox | Yes | Yes | No |
| Safari | N/A | N/A | Yes |
| Opera | Yes | Yes | No |
| Edge | Yes | Yes | No |
