Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
230 views
in Technique[技术] by (71.8m points)

My service worker shall support push notifications without a payload?

I'm reading Mozilla's Service Worker Cookbook and I found that service workers implement event listener for the "push" event in two different ways:

  1. Simply receive the payload inside the push notification event: https://serviceworke.rs/push-payload_service-worker_doc.html
  2. Send a call to the server to retrieve the payload, after the notification is received: https://serviceworke.rs/push-get-payload.html

Why would I need to implement push notifications using the second options? Are there some browsers that don't support payload inside the push notifications?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...