Is Safari intentionally excluded from the Service Worker installation?
-
I saw that there is an exception for the Safari browser that the Service Worker is not installed, is there a reason for this?
This makes it impossible to subscribe to push notifications in the Safari browser even when installing the page as a PWA application
-
I saw that there is an exception for the Safari browser that the Service Worker is not installed, is there a reason for this?
This makes it impossible to subscribe to push notifications in the Safari browser even when installing the page as a PWA application
Probably safari didn't support service workers when this code was added.
-
> @baris said:
>
> Probably safari didn't support service workers when this code was added.So, would it be possible to revert Safari to a standard Service Worker installation today?
It may still only support it when the page is installed as a PWA, so you need to implement exception handling by checking something like this:if (!('serviceWorker' in navigator)) { return; } -
I saw that there is an exception for the Safari browser that the Service Worker is not installed, is there a reason for this?
This makes it impossible to subscribe to push notifications in the Safari browser even when installing the page as a PWA application
If someone with safari can confirm it works when
!config.useragent.isSafariis removed, we can make that change. -
If someone with safari can confirm it works when
!config.useragent.isSafariis removed, we can make that change.> @baris said:
>
> If someone with safari can confirm it works when!config.useragent.isSafariis removed, we can make that change.I tested it, and indeed it helped.. so you can make this change..
Only there is a very annoying bugIf my friend sends me three private messages in a row, whose content is "Message 1" "Message 2" "Message 3" I would receive three notifications with the following content: "Message 1" "Message 1" "Message 1"
Which means I would receive the same content of the first message in the three notifications...Did you understand the problem and can you fix it?
It seems to me that this happens because when sending several messages in a row, the message ID is not the same, and then it takes the content from the first message.
-
I saw that there is an exception for the Safari browser that the Service Worker is not installed, is there a reason for this?
This makes it impossible to subscribe to push notifications in the Safari browser even when installing the page as a PWA application
I think that might be just the notification merging that happens in core, not something related to service worker.
-
I think that might be just the notification merging that happens in core, not something related to service worker.
-
I saw that there is an exception for the Safari browser that the Service Worker is not installed, is there a reason for this?
This makes it impossible to subscribe to push notifications in the Safari browser even when installing the page as a PWA application
@שניאור-שמח can you share a screenshot of the issue you are seeing, is it the notification in nodebb or the email notification?
-
@שניאור-שמח can you share a screenshot of the issue you are seeing, is it the notification in nodebb or the email notification?
-
I saw that there is an exception for the Safari browser that the Service Worker is not installed, is there a reason for this?
This makes it impossible to subscribe to push notifications in the Safari browser even when installing the page as a PWA application
These are push notifications so they are likely handled in the web-push plugin, I see a PR there https://github.com/NodeBB/nodebb-plugin-web-push/pull/64 that might fix this issue @julian
-
These are push notifications so they are likely handled in the web-push plugin, I see a PR there https://github.com/NodeBB/nodebb-plugin-web-push/pull/64 that might fix this issue @julian
-
@baris That's right, that's what I have installed, but it only helped the notifications appear on the iPhone in the Safari browser, but it still didn't help with the notification merging problem.
So I ask you to try to sort this out.
thanks.@שניאור-שמח are chats the only type of notification failing at merging?
@baris web push is a direct reflection of regular notifications so if they share merge id, the old push notif is removed and replaced
-
I saw that there is an exception for the Safari browser that the Service Worker is not installed, is there a reason for this?
This makes it impossible to subscribe to push notifications in the Safari browser even when installing the page as a PWA application
@julian seems like safari is picky about replacing same notifs with
tag, the PR on the repo has some code to handle safari via mergeId.
-
@julian seems like safari is picky about replacing same notifs with
tag, the PR on the repo has some code to handle safari via mergeId.
-
I saw that there is an exception for the Safari browser that the Service Worker is not installed, is there a reason for this?
This makes it impossible to subscribe to push notifications in the Safari browser even when installing the page as a PWA application
The code in that pull request isn't merged yet, so it is not active in the latest version of nodebb. Once it's merged and published you can install and test it. Or you can replace the plugin with your own version for testing.
-
The code in that pull request isn't merged yet, so it is not active in the latest version of nodebb. Once it's merged and published you can install and test it. Or you can replace the plugin with your own version for testing.
@baris This is what I did, I installed the plugin with the changes and it still didn't help..
What I'm trying to explain is that the change my friend made for message merging didn't help the problem..
So I would appreciate it if you could see what the problem is and fix it..
Thank you -
I saw that there is an exception for the Safari browser that the Service Worker is not installed, is there a reason for this?
This makes it impossible to subscribe to push notifications in the Safari browser even when installing the page as a PWA application
@שניאור-שמח unfortunately I don't have an iphone so I can't test the changes.
-
@שניאור-שמח unfortunately I don't have an iphone so I can't test the changes.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login

