Best practices to dismiss web push notifications cross devices

Đang mở
#359 1 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript
Lĩnh vực
api

Hướng nghiên cứu

The issue describes synchronizing notification dismissal across devices through the Push API and service workers, but names no repository files or tests. Start by reading the Push API specification sections on subscriptions and push events, then identify whether the API can support the requested behavior. Done would mean documenting or specifying a supported approach that lets a notification read on one device disappear on the others.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Hello,

I'm working on a web application that allows receiving push notifications on different devices. I would like to ensure that when a user reads a notification on one device, it gets removed from the others.

I wanted to use subscribe with userVisibleOnly: false, but it seems that Chrome doesn't currently support it...

It seems that if no notification is sent for a "push" event at the service worker level, the browser may display a warning notification to the user indicating that it's working in the background.

I was thinking of including the IDs of my unread notifications in each push and removing any notifications that don't match before adding the new one. However, I'm still facing an issue if I have only one notification and it becomes read.

What are the current best practices to achieve this?

Have a good day.
Maxime

Ngôn ngữ chính
HTML
Star
158
Fork
43
Merge trung bình
2 ngày 6 giờ
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của w3c/push-api

Tất cả issue của w3c/push-api

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.