Simple Push Demo
This document outlines how to send push notifications to a browser using a CURL command or a server-side network request, detailing the necessary components like endpoint URL, request headers, and body. It also explains content encoding, specifically the transition from `aesgcm` to `aes128gcm`.
A change to the web push spec moves browsers from aesgcm to aes128gcm content encoding.
Technology
Key Points
- •The document explains how to send push messages to a browser.
- •It provides a CURL command example for sending push messages.
- •It details how to send push messages from a server, including endpoint URL, request headers, and request body.
- •It mentions that a CORS proxy server is used due to push services not allowing CORS.
- •The supported content encodings for push messages are discussed, particularly the transition from `aesgcm` to `aes128gcm`.
push notificationsweb pushcurlservercorscontent encodingaesgcmaes128gcm
Body
Add payload text
#### This Browsers Subscription
Below is your current subscription.
* * *
#### Supported Content Encodings
A change to the web push spec moves browsers from `aesgcm` to `aes128gcm` content encoding.
To determine which is supported in the current browser you can view `PushManager.supportedContentEncodings`.
Below is the list of supported encodings.
* * *
#### CURL Command
Download the binary payload file. Run the terminal from the folder where the `payload.bin` file has been downloaded. Copy and paste the following CURL command into your terminal to send a push message to this browser.
* * *
#### Push from a Server
Some push services don't allow CORS. So you can't make a network request directly from the browser. That's why this demo uses a CORS proxy server under the hood to forward push message to push endpoint. To send a push message to this browser, you need to make a network request from your server with the following pieces of info (this is essentially a breakdown of the CURL command above):
##### Endpoint URL
##### Request Headers
##### Request Body
* * *
Sources: article, google_favicon
Raw Input
Source: Simple Push Demo https://share.google/zzDTMWQMBEOABX7CR
Content Versions (3)
[user_text] User Submission
Description: Source: Simple Push Demo https://share.google/zzDTMWQMBEOABX7CR
Body text
Source: Simple Push Demo https://share.google/zzDTMWQMBEOABX7CR
[article] Simple Push Demo
Description: A change to the web push spec moves browsers from aesgcm to aes128gcm content encoding.
Quality: Article scraper OK; Iframely OK; No images found
Body text
Add payload text #### This Browsers Subscription Below is your current subscription. * * * #### Supported Content Encodings A change to the web push spec moves browsers from `aesgcm` to `aes128gcm` content encoding. To determine which is supported in the current browser you can view `PushManager.supportedContentEncodings`. Below is the list of supported encodings. * * * #### CURL Command Download the binary payload file. Run the terminal from the folder where the `payload.bin` file has been downloaded. Copy and paste the following CURL command into your terminal to send a push message to this browser. * * * #### Push from a Server Some push services don't allow CORS. So you can't make a network request directly from the browser. That's why this demo uses a CORS proxy server under the hood to forward push message to push endpoint. To send a push message to this browser, you need to make a network request from your server with the following pieces of info (this is essentially a breakdown of the CURL command above): ##### Endpoint URL ##### Request Headers ##### Request Body * * *
[google_favicon] Image Search Result
Quality: Source: google_favicon, priority: 15