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/

145 questions
3
votes
1 answer

Web Notification API - website doesn't need to be open?

I noticed some news sites such as Washington Post are able to pop up Web Notifications even though I don't have the site open in a tab. I don't recall this being possible before. How is it even possible for a website to execute the JS necessary if…
ffxsam
  • 26,428
  • 32
  • 94
  • 144
3
votes
5 answers

Display icon in notifiaction FirefoxOS

I want display an icon in Notofication Firefox OS for that I use this code : var img = './images/icon-30.png'; var notification = new Notification('Notification', { body: 'Body Notification', icon: img }); notification.addEventListener('click',…
2dar
  • 611
  • 2
  • 9
  • 22
3
votes
1 answer

Prevent Firefox Web Notifications from automatically Closing

I've got Web Notifications working in Firefox in combination with Server Sent DOM events. Unfortunately the notifications disappear after about two to three seconds. I prefer Chrome's method of leaving the message visible (with a maximum of three…
John
  • 1
  • 13
  • 98
  • 177
3
votes
3 answers

Can a web app give desktop notification

Well, A small idea of making an application ran through my mind. But this is the first time I would try to make an application. Till now I have worked on PHP, C++, Ruby with Rails frame work, but all at a beginner level. I am ready to take a bigger…
vin
  • 869
  • 4
  • 17
  • 33
2
votes
0 answers

PWA notifications without backend

I am making a todo app with Javascript (PWA). There will be reminders for the todos. I want to send notifications to the user to remind them. Tasks and remind time will be stored in localStorage. So now I want to send notifications without any…
2
votes
1 answer

Push notifications or Web push notifications for PWA

first, I want to state that I've been researching between push notifications and web notifications but I'm a bit confused. I've read that push notifications for PWAs don't work for iOS (iPhones) on Safari from here: Sending Push Notifications to iOS…
2
votes
2 answers

After accepting web notifications, can a website send notifications when browser has no tab open of this website?

I am reading the Web notification API and I want to send notification like they are on iOS or Android (ex: You have 7 new messages). Considering I have accepted notification from www.my-foobar-super-site.com, can I, after authorizing notification…
Dimitri Kopriwa
  • 13,139
  • 27
  • 98
  • 204
2
votes
0 answers

Notifications With Tags Don't Show On Chrome

I'm trying to send notifications with a tag. When I send two notifications with the same tag, I expect the second notification to replace the first one if it's still visible, or to just show up if the first one auto-hided. However, when testing on…
laurian
  • 739
  • 6
  • 18
2
votes
0 answers

Is there a way to replace default browser logo in web notifications?

I'm working on simple POC project that use service workers and web notifications. I'm wondering if there is an option to replace browser logo (e.g Google Chrome logo) with the custom one. I've looked into Service Workers API documentation and I…
2
votes
1 answer

Creating a service worker in vue.js using workbox's injectmanifest crashes

I am trying to use vue.js's progressive web app capabilities by creating a custom service worker through workbox. Everytime I attempt to build the app I get the following error: AssertionError [ERR_ASSERTION]: swSrc must be set to the path to an…
2
votes
1 answer

Custom Push Service

In the context of pushing notifications to web-browsers, the PUSH SERVICE acts as interface between the SERVICE WORKER and APPLICATION SERVER. My current understanding is that Google FCM is the Push Service for Google Chrome & FireFox…
2
votes
3 answers

How to send push notifications to web application and browser?

I have a database in which I insert and send data using java.So I want to send push notifications using java to my web application and getting them in javascript. I also want to send push notification to my browser.Is there an easy way to do these…
2
votes
1 answer

Notification.permission is set to denied and not present in blocked

On my localhost in chrome during unit testing of Notification permission, I have closed the browser native notification permission box by clicking on (x) after that I am not able to change / remove it to default from browser Setting > Content…
Vinay Rajput
  • 83
  • 1
  • 9
2
votes
1 answer

Web Notifications API - Only show once per period

I'm writing a web app that needs to send notifications. It checks 12 different things every 30 seconds and if one of them meets the criteria it should send a notification; it then shouldn't send another notification until the next 30 minute (on the…
Flatlyn
  • 2,040
  • 6
  • 40
  • 69
2
votes
0 answers

Web notification API not working locally

I'm trying to recreate the page shown in this tutorial. The code is as following: if (!('Notification' in window)) { document.getElementById('wn-unsupported').classList.remove('hidden'); …
Snowman
  • 2,465
  • 6
  • 21
  • 32