The Web Push protocol headers
Web Push (RFC 8030) lets an application server deliver a notification to a user agent through an intermediary push service, addressed by the subscription’s endpoint URL. A handful of request headers control retention, priority and de-duplication, and VAPID (RFC 8292) authenticates the sender. This reference covers those headers and the Authorization format.
How it works
The application server sends a POST to the subscription endpoint with an
encrypted payload and the control headers; the push service stores or relays it
to the device:
POST /push/abc123 HTTP/1.1
Host: push-service.example
TTL: 86400
Urgency: high
Topic: chat-42
Content-Encoding: aes128gcm
Content-Type: application/octet-stream
Authorization: vapid t=<signed-JWT>, k=<base64url-public-key>
<encrypted binary payload>
TTL is mandatory and sets how long the message is retained for an offline
device. Urgency and Topic are optional: urgency influences battery-aware
delivery, and topic lets a later message replace an undelivered earlier one. The
VAPID JWT, signed with your ECDSA P-256 key, proves the sender’s identity.
Tips and notes
TTLis required even for immediate delivery — useTTL: 0for fire-and-forget.- Set
Topicto collapse rapid updates into the latest notification. - VAPID JWT
expmust be at most 24 hours in the future or the push service rejects it. - Payloads are encrypted end-to-end; the push service cannot read them.