push notification
A push notification (AKA client notification) is a notification that shows up on one or more of your client devices without you having to explicitly request it — it's "pushed" to you, instead of you having to poll for it.
Why
You should implement push notifications for yourself, your site so you don't have to poll your notifications page.
How to
No replicable indieweb solutions to Push Notifications yet. See #Projects below for work in progress and #Brainstorming for areas to explore.
IndieWeb Examples
Aaron Parecki
Aaron Parecki's site aaronparecki.com receives webmentions and then sends them to his own IRC channel, which then sends a push notification to his phone when his IRC status is "AFK" status. The notification sends just the two URLs (source, target), and the type of webmention, e.g. reply, like, etc. mention-app (see Projects below) is his eventual goal.
Ben Roberts
Ben Roberts's site uses Google Cloud Messaging service to send notifications to his phone and desktop. This uses the new Push API still being implemented in browsers. The notification simply links to ben.thatmustbe.me/activity but more recent versions would allow for pushing information to the notifier as well. While mobile works, it seems to forget itself after a time (restart of phone?).
Known
Out of the box Known supports browser push notifications (on Chrome, and possibly(?) others) for interactions with posted content (likes and comments).
Jamie Tanna
Jamie Tanna converts webmention interactions to push notifications, previously using Pushbullet, but now using Pushover.
Jamie has copied aaronpk's idea of the Okta Factors API for push notifications for IndieAuth logins https://www.jvt.me/posts/2020/11/11/okta-factors-api-passwordless/
Jamie also plans to use a `notify` scope to allow clients to notify him, using a specific notification service (yet to be written).
Silo Examples
- On 8/10/16 WordPress.com began using push notifications in Chrome & Firefox to notify blog users of likes and comment interactions on their sites. They indicated: "Browser notifications give you a real-time sense of your readers’ reactions, allowing you to stay more engaged with your audience."
Projects
Mention app
Aaron Parecki brainstormed an iOS app (for now called just mention-app) to send him push notifications from an h-feed. Thus, if a server publishes received webmentions into an h-feed page, the app will get those (hopefully via PuSH, last resort via polling), and propagate them to the user's iOS device.
Brainstorming
For notifications from an indieweb site to a web browser on a device, you may be able to use one or more of the following:
- http://www.w3.org/TR/notifications/
- https://wiki.mozilla.org/WebAPI/SimplePush
- Works on FirefoxOS devices and (presumably) the desktop simulator
- https://developer.apple.com/notifications/safari-push-notifications/
- https://developer.mozilla.org/en-US/docs/Web/API/Push_API/Using_the_Push_API
- Tutorial and sample code for using the new WebPush API in Firefox and Chrome
- https://developers.google.com/web/updates/2015/03/push-notificatons-on-the-open-web?hl=en
- This describes how to do it specifically in Chrome
- Supported in Firefox as well since 2016-01
- if you use a mobile messenger with push support, messages sent by a bot work like a kind of push message
- Pushover
- Pushbullet
- Pushpad
See Also
- notification
- 2018-06-04 Apple’s new product features are an admission of guilt
- 2017-07-23 WIRED: Turn Off Your Push Notifications. All of Them
- 2015-08-18
Ryan Johnson: APNS Authentication
Apple’s push notification service got authentication all wrong (I’m assuming Google’s service is similarly broken but I’m less familiar with it).
- https://twitter.com/katierosman/status/1103109217626415105?s=19
- "Screen-grabbed from Facebook: a teacher had her students turn their phone volume up and create a collective record of the notifications they received in a single class period." @katierosman March 6, 2019
- https://ntfy.sh/ provides an implementation of https://unifiedpush.org/ that website developers can use to own their push notifications