Questions tagged [push-api]

The Web Push API lets users of your Web app receive push notifications at any time—even in the background; that is, even when your Web app is not currently running in the foreground on the user’s device (or even when the browser on the user’s device is not currently running). It use Service Workers to handle messages sent using common push services, and to allow your Web app to react to the push notifications it receives.

For more information about the Web Push API, see the actual Push API spec and the articles Using the Push API and Push Notifications on the Open Web. The MDN article Using Service Workers is also relevant.

The IETF standards that describe the Web Push protocol and its message encryption scheme are really useful to understand how to build an application server that sends push notifications to clients and how to encrypt push message payloads.

117 questions
0
votes
0 answers

Web Push API- Service worker notification

I need to show a SW notification when window cilent is hidden and should not show a notification when window client visibility state is visible. I have tried below code. But SW shows default notification. This site has been updated in the…
0
votes
1 answer

Do I need a privacy policy on my personal website if I implement web push notifications?

I'm creating a personal website and learning to implement a service worker that takes advantage of the push API in order to update myself and whatever others look at it that I have updated the website whenever I deploy. I figured out that the…
0
votes
3 answers

Export public key to base64 in Ruby

I have a public key in PEM format that was generated with: ecdsa_public_key = OpenSSL::PKey::EC.new ecdsa_private_key ecdsa_public_key.private_key = nil ecdsa_public_key.to_pem I have to read the PEM string and get a base64 url encoded string. How…
collimarco
  • 34,231
  • 36
  • 108
  • 142
0
votes
1 answer

Web Push : firefox endpoint returns InvalidRegistration ID

I have implemented push notifications for Chrome & firefox. And testing using curl command on command line. curl --header "Authorization: key=" --header "Content-Type: application/json" https://android.googleapis.com/gcm/send -d…
0
votes
2 answers

PushPad: Chrome doesn't display push-notifications

This question results from following question (see comment section): PushPad: Subscribe is removed after site refresh I've got a problem using PushPad. I've created a project, implemented the code and so on. My problem is that Chrome does not…
Fabian H.
  • 133
  • 1
  • 2
  • 8
0
votes
1 answer

Push notification with service worker in mozilla firefox

I am new to service worker and trying to learn it. I am implementing push notification using service worker. I am looking for simple demo code for pushing at server side and receive at client side notification as a reference in developing my web…
AnkitJ
  • 346
  • 1
  • 3
  • 19
0
votes
1 answer

Chrome Push Notifications: send invisible push

I want to send not only pushes with messages (via fetch) but sometimes also invisible push (i.e. do not show notification at all) just to check how much users still subscribed and how fast they receive a push. I tried this code. It seems to work,…
0
votes
1 answer

Service Worker get data from server without being logged in

What I'm trying to do is make a web app that has a Service Worker installed to show push notifications to the user using Push Notifications API on Chrome and Firefox. But I don't know if this can be done when user session expires, because server…
David Ortega
  • 915
  • 9
  • 25
0
votes
2 answers

Limit and quota chrome push-notification limit google-cloud-messaging

Hello I am working to include push notifications for chrome, basically I followed steps https://developers.google.com/web/updates/2015/03/push-notifications-on-the-open-web although I then added different stuff. Everything works correctly but I…
0
votes
1 answer

Chrome Push Notifications: can't subscribe from sub-path

I'm trying to subscribe to the pushManager, and I can only achieve it while on the root (/) path. If I navigate to any sub path (/mypath), I recieve Unable to subscribe to push. DOMException: Registration failed - no sender id provided. The problem…
Tomas Romero
  • 8,418
  • 11
  • 50
  • 72
-2
votes
1 answer

node.js websocket, converting JSON data

with node.js I run this code: var autobahn = require('autobahn'); var wsuri = "wss://api.poloniex.com"; var connection = new autobahn.Connection({ url: wsuri, realm: "realm1" }); connection.onopen = function (session) { function…
NikosTikos
  • 1
  • 1
  • 4
-4
votes
2 answers

How can we implement web push notification?

How to implement push notification in browsers using the googles GCM service. What are the steps to implement the same.
1 2 3 4 5 6 7
8