HomeAll ToolsNotifications

Push Notification Test

Test browser notification permissions and delivery.

environmental inspection
Security context (HTTPS)no
Notification APINot supported
Service WorkerNot supported
Current permissionsdefault
SW readyno
- If the permission is denied: You need to go to the browser site settings to manually change back to allow.
- Some browsers require "user gesture" triggering (clicking a button) to allow notifications to pop up.
Notification parameters
- "In-page notification" can verify `Notification.onclick/onclose` (when the page is alive).
- "SW notification" can verify `notificationclick` (closer to real push/background notification interaction).
event log
After clicking on the notification, a "clicked" callback record should appear here.
No logs yet. Suggestion: Click "Request Notification Permission" first, then trigger the notification and click on it.

How to use this page to quickly locate problems

Let’s look at the “security context” first: notification capabilities usually require https; most browsers will directly reject it on ordinary http.
When the permission is denied, the page cannot be automatically restored: you need to go to the browser address bar/site settings to change the notification back to "Allow".
If "triggering on-page notification" fails, first confirm whether it is a "required user gesture" (triggering by button click is usually sufficient).
If there is no response after clicking "SW Notification", first click "Register Service Worker" and confirm that background notifications are not disabled by the browser for the site.
After clicking on the notification, look at the "event log": notifications within the page go to Notification.onclick; SW notifications go to notificationclick (closer to real push).

Notify Guide

Request permission, trigger notification, check callback.

Step 1

Confirm that the environment meets the conditions

about 5 seconds

Notification capabilities typically require a secure context (HTTPS) and browser support for Notification and Service Workers.

Confirm "Security Context" is Yes (HTTPS)
Confirm Notification API / Service Worker is supported
If it is not a security context: switch to https access and try again
Step 2

Request notification permission

about 10 seconds

Click "Request notification permission" and let the browser pop up asking whether to allow notifications.

If the result is granted: you can continue to trigger notifications
If the result is denied: Go to the site settings and manually change it to allow (the page cannot be automatically restored)
If the window never pops up: Check whether the browser has remembered the selection or it has been blocked by policy.
Step 3

Trigger in-page notifications and test click callbacks

about 10 seconds

In-page notifications can verify Notification.onclick/onclose (while the page is alive).

Set title/content/Tag (optional)
Click "Trigger on-page notification (new Notification)"
Click on the pop-up notification and check whether onclick records appear in the "Event Log"
Tip: Some browsers require that it must be triggered by user gestures (just click the button).
Step 4

Register a Service Worker and trigger system notifications

about 15 seconds

SW notification is closer to real push/background notification interaction, click and go notificationclick.

Click "Register Service Worker" and confirm that SW ready changes to Yes
Click "Trigger SW Notification (showNotification)"
After clicking the notification, check the Event Log to see if the SW postback is received (NOTIFICATION_CLICK/NOTIFICATION_CLOSE)

FAQ

Compilation of high-frequency issues regarding notification permissions, on-page notifications and Service Worker notifications.

1.

What is this page mainly used for?

Used to verify browser notification capabilities: including permission status (default/granted/denied), whether the Notification (new Notification) in the page can pop up, and whether the showNotification of the Service Worker can pop up and return click/close events.

2.

Why doesn’t the “Request notification permission” pop-up window pop up?

Common reasons: The current is not a secure context; the browser has remembered previous choices (especially denied); or is blocked by enterprise policy/browser settings. First confirm that the "Security Context" is yes, and go to the site settings to check the notification permissions.

3.

What should I do if the permission is denied?

The page cannot automatically change denied back to granted. Please go to the site settings (or system notification settings) in the browser address bar, change the site notification to "Allow", then refresh the page and try again.

4.

Does iOS Safari support system notifications?

iOS Safari's notification capability support is limited, and it usually requires an "Add to Home Screen" PWA form to use the notification capability; even then, it will be affected by the system version and permissions policy.

5.

Why does triggering the notification fail and prompts that a user gesture is required?

Some browsers restrict non-user gestures from triggering notifications. Please use button clicks on the page to trigger (rather than automatic triggering/scheduled triggering), and make sure the tab is not in the background.

6.

SW notification is not returned to the log after being clicked?

First click "Register Service Worker" and confirm that SW ready is yes, then trigger the SW notification and click. If there is still no response, check whether there is `/notification-sw.js`, whether the background notification is intercepted by the browser, and whether there are Service Worker related errors in the console.

7.

Why can I trigger notifications but the system doesn't show them?

It may be intercepted by the system's "Do Not Disturb Mode/Focus Mode", the system notification master switch, and the browser's own notification switch; it may also be affected by site silence or aggregation policies. It is recommended to check the system notification center and browser site permissions.