Priority
How low, normal, high and urgent change how a notification is delivered and shown.
priority tells Push how much a notification matters. It is one of low, normal, high or urgent. When a send gives neither priority nor urgency, it is high, so notifications go out fast by default.
⫻
request body
What it changes#
| Effect | low | normal | high | urgent |
|---|---|---|---|---|
Web Push Urgency header | low | normal | high | high |
| Display | Shown without sound or vibration (silent) | As sent | As sent | Stays on screen until the person acts (requireInteraction) |
silentandrequireInteractionare only filled in when you did not set them yourself. Sending"priority": "urgent", "requireInteraction": falsekeepsfalse.- Those two filled-in fields count toward the encoded size of the notification.
- The Web Push
Urgencyheader is a hint to the browser vendor's push service and the device's battery saving;lowmessages may wait until the device wakes.
The urgency field#
urgency is the older way to set this and still works as an alias. When both are sent, priority wins.
| urgency | Becomes priority |
|---|---|
| very-low | low |
| low | low |
| normal | normal |
| high | high |
Note
urgency is deprecated. New code should send priority.Choosing a priority#
urgent: something is broken now and a person has to act, like an outage page.high: the default. Things people want to see soon, like a finished deploy or a new order.normal: worth seeing, but not urgent, like a daily summary.low: background updates that should not make a sound.
Hooks map their own priority formats onto these four. A notification's priority is shown in Get a notification.