-
Notifications
You must be signed in to change notification settings - Fork 149
When will Edge support userVisibleOnly: false for webpush like Chrome does? #211
Since MV3 breaks the possibility to have sockets open for realtime notifications in our extension, Chrome added support for the userVisibleOnly: false option on registration.pushManager.subscribe. Apparently Edge does not support this.
What is the recommended workaround for realtime push for Edge, and why is it different from Chrome?
const subscribe = await registration.pushManager.subscribe({
userVisibleOnly: false,
applicationServerKey: serverKey
});
Results in:
Uncaught NotAllowedError: Registration failed - permission denied
This code works in Chrome.
All reactions
Replies: 4 comments 2 replies
Hey Erik Rothoff Andersson (@erkie), we are looking into this and will let you know as soon as we have an update.
All reactions
ManikanthMSFT (@ManikanthMSFT) any news?
All reactions
Hello erkie ,
Currently, Microsoft Edge does not support the userVisibleOnly: false option for push subscriptions. This means that silent/background push notifications are not supported in Edge, and attempting to use this option may result in a permission error.
As a supported approach, we recommend using userVisibleOnly: true and ensuring that each push event results in a visible notification to the user. This aligns with Edge’s implementation of the Push API, which requires user-visible notifications for push messages.
At present, there is no confirmed timeline for supporting userVisibleOnly: false in Edge. We recommend designing your implementation accordingly to ensure compatibility.
For more details, reference document: https://learn.microsoft.com/en-us/microsoft-edge/progressive-web-apps/how-to/push
All reactions
How are we supposed to support use cases where a long lived socket connection worked in MV2 in the MV3 migration? We have yet been able to upgrade our Edge extension due to this gap in functionality in MV3 Edge?
All reactions
Hi Erik Rothoff Andersson (@erkie) ,
As a workaround, you may consider implementing user-visible push notifications (userVisibleOnly: true), periodic polling of your backend service, WebSocket connections while the extension UI is active, or a hybrid synchronization model combining push notifications and server-side update checks. The most appropriate solution will depend on your real-time requirements and user experience considerations.
Regards,
Venkat
All reactions
-
👎 1
Why not just support uservisible: false like chrome? Why have a worse experience for Edge than Chrome?