Repository navigation
Push Notifications
YAF.NET v4 can send browser push notifications for new topics and replies in the forums and topics a user watches. Users get them even when the forum isn't open in a browser tab. The same feature lets users install the forum as an app (Progressive Web App, PWA).
Push notifications use the Web Push standard with VAPID keys. They are turned off until you configure the keys.
- The forum runs on HTTPS. Browsers only allow push notifications on HTTPS sites (and on
localhostfor testing). - A browser that supports Web Push: all current versions of Chrome, Edge, Firefox and Safari (on iOS / iPadOS only after adding the forum to the home screen).
Generate a key pair at yetanotherforum.net/Vapid-Keys, or with any other Web Push VAPID key generator, e.g. the web-push npm package:
npx web-push generate-vapid-keysImportant
Keep the private key secret, and don't commit it to a public repository. If you change the keys later, all existing subscriptions stop working and users have to subscribe again.
"VapidConfiguration": {
"PublicKey": "<your public key>",
"PrivateKey": "<your private key>"
}With Docker:
environment:
- VapidConfiguration__PublicKey=<your public key>
- VapidConfiguration__PrivateKey=<your private key>Restart the forum.
Each user turns on push notifications for each device and browser under My Account > Notification Preferences > Device (Browser) push notifications. The browser then asks for permission to show notifications.
Guests can't subscribe.
- The option is missing: the keys are empty, or the forum hasn't been restarted after you added them.
- The browser doesn't ask for permission: the site doesn't run on HTTPS, or notifications for the site were blocked earlier in the browser settings.
- Notifications stop after a while: the browser or operating system removed the subscription. The user can subscribe again on the same page.
YetAnotherForum.NET (YAF) the Open Source Discussion Forum for ASP.NET - https://YetAnotherForum.NET - Support me on Ko-fi
Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved
Getting started
- About YAF.NET
- Features
- Docker
- Installation (IIS)
- Hosting on Linux with nginx
- Integration (ASP.NET Core)
- Upgrade to v4
Configuration
Administration
Help
Development
Legacy (v3 and older)