Questions tagged [web-notifications]

The Web Notifications API provides a way for a web application to show a platform-level notification to a users — outside of a browser’s viewport and regardless of whether the web application that generated the notification is in the currently-active tab/window.

Web Notifications API for end-user notifications provides a way to alert users — outside the context of a web page — of an occurrence such as the delivery of an e-mail message.

https://notifications.spec.whatwg.org/

139 questions
7
votes
1 answer

How to capture notifications in a WKWebView?

I'm working on a macOS desktop app in Swift 4. It has a WKWebView which loads up a web page that sends notifications. None of the notifications are shown by default and there's also no permission request. I need a way to show the notifications and…
BAndonovski
  • 3,183
  • 1
  • 13
  • 17
7
votes
0 answers

Angular web notification is not coming on another devices

I am trying to put the web notifications to my site so that all of my clients will see my notification in browser, when I add any new item in my site. I chose angular-web-notification, I installed through Bower in my app and tested locally, it…
7
votes
1 answer

Preventing multiple web notifications?

I'm using websocket to receive notifications from server side, when I got a notification, I show a desktop notification using the Web Notification API, the problem is, if I'm opening this page in multiple tabs, I'd receive multiple duplicated…
wong2
  • 28,972
  • 43
  • 121
  • 165
6
votes
2 answers

notificationclick does not fire in chrome even though registered in addEventListener in serviceworker.js

I'm enabling web notification to my web site and added below event listener to service worker .js file, This works fine in edge and click event gets trigger and opens a new window, however chrome nothing happens and event it self does not trigger…
dewraj singh
  • 98
  • 10
5
votes
2 answers

Server worker being registered twice

I'm using FCM web notification service, when I am calling the register function: if ('serviceWorker' in navigator) { window.addEventListener('load', function() { navigator.serviceWorker.register('/sw.js').then(function(registration)…
5
votes
2 answers

Resetting denied HTML notifications

I have a web app in which I am using HTML Notifications. It works fine if the user allows it for the first time and start using it, however if user blocks the notification the first time by clicking the block button and later on try to request…
firebolt_ash
  • 874
  • 2
  • 10
  • 20
5
votes
2 answers

Go to an already opened tab when a Chrome Notification is clicked

Javascript in a web page (not a Chrome app or extension) can create a Chrome desktop notification, and set an URL to be opened when the notification is clicked. var notification = new Notification('Notification title', { icon:…
4
votes
2 answers

Firebase web push notification not working messaging.onMessage

I have configured web push notifications to my PWA ionic 4 app. The web push notifications are working like a charm when the tab is switched i.e in background or other than my app. The issue is when the tab is active I get the push messaging inside…
4
votes
1 answer

Can I Send a Web Notification on a Specific Time?

I am trying to implement notifications that do not need the interaction of the backend to be shown. The use of this is to put a remind me button, that would send a notification on certain time of the day (that the user specified). I am pretty new to…
4
votes
1 answer

What is the correct way to ask for a user's permission to enable web push notifications?

I currently learning about service workers, and in particular subscribing a user to push notifications. I've worked through the Web Push Notifications Guide and Adding Push Notifications to a Web App Code Lab that Google publishes - but I'm seeing…
4
votes
1 answer

Chrome web notifications without SSL (bypassing Service Worker)

So, is it possible to implement web notifications for Chrome without SSL certificate? I want to avoid installing SSL on my site and it would be cool if there was a way to send notifications without Service Worker.
4
votes
1 answer

Activate browser tab using HTML5 Notification

I'm using the HTML5 Notification API to show a message if new content is available. I'd like to show the browser tab that caused the notification to be activated when the user clicks the message, but I haven't been able to find an API to do so. I…
Jorn
  • 16,599
  • 15
  • 67
  • 103
3
votes
1 answer

Cancel sent Web Push notifications

I'm sending push notifications to my website users when they (for example) receive a private message. That notification goes to all browsers subscribed for that user. So could be desktop, mobile, work computer etc. What I would like to do is close…
Matt Deemer
  • 133
  • 1
  • 2
  • 8
3
votes
0 answers

Refreshing the FCM token and Un-subscribing from web notifications using javascript or jquery

I am sending notification to my web application from FCM. It is working fine. Now I have to do following two things : I have to refresh the token each time when user visit to the portal How user can un-subscribe from notification I have to do the…
3
votes
0 answers

Web/Push Notifications and Accessibility

I would like to know if there is any information or support available regarding Accessibility features with respect to Web Notifications on Chrome and Firefox browsers. We are trying to implement Web Notifications using the Notifications API…
Tanik
  • 31
  • 1
1
2
3
9 10