3 ms·
> Browsers that support JavaScript typically implement the Notification API. This API asks for user confirmation to allow popups and give the programmer the opp
by hunter2_ 2y ago
> Browsers that support JavaScript typically implement the Notification API. This API asks for user confirmation to allow popups and give the programmer the opportunity to display notifications with a text (body) along with an descriptive icon and header.
https://en.wikipedia.org/wiki/Pop-up_notification#JavaScript https://en.wikipedia.org/wiki/Pop-up_notification#JavaScript
- TeMPOraL 2y agoOf course, this is just abused by sites to spew their garbage outside the confines of their own pages, which makes the API effectively dead.
- xp84 2y agoIndeed. I would rather all browsers just disable it by default with not even the popup asking if I want it. If I install a webapp as a PWA then maybe ask me. Otherwise? Website operators are on crack if they think I want them to be able to spam my desktop multiple times a day even months or years after I visited them!
- Maxion 2y agoYep, if this feature was limited to the window in focus, then the API could make sense. The way it is now, I know all savvy users will just block it, and many of the non savvy ones will too... Complete waste of time to dedicate developer resources too over e.g. in-line toasts.
- TRiG_Ireland 2y agoSometimes (as in a chat app) I want the window to notify me when anything changes, so I don't have to sit and look at it.
- xp84 2y agoSure! Unfortunately I am not sure I’ve ever seen the api used for anything other than what I’d call spam. To the point where as soon as I’m prompted I’m finding that “block” button before even speculating what it’s supposedly for.
- michaelmrose 2y agoI only allow notifications from a tiny number of sites. The ability to notify me while on the page is different from notifying me while the tab is in the background and more so yet than the ability to bug me whenever. Ask for everything get nothing. I imagine most people click no