Skip to content

Navigation Menu

Sign in
Sign up

When will Edge support userVisibleOnly: false for webpush like Chrome does? #211

Erik Rothoff Andersson (erkie) started this conversation in General
Discussion options

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.

You must be logged in to vote

Replies: 4 comments 2 replies

Comment options

Hey Erik Rothoff Andersson (@erkie), we are looking into this and will let you know as soon as we have an update.

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

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

You must be logged in to vote
1 reply
Comment options

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?

Comment options

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

You must be logged in to vote
1 reply
Comment options

Why not just support uservisible: false like chrome? Why have a worse experience for Edge than Chrome?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /