| 1 |
# Subscribe from the web app |
| 2 |
The web app lets you subscribe and publish messages to ntfy topics. For ntfy.sh, the web app is available at [ntfy.sh/app](https://ntfy.sh/app). |
| 3 |
To subscribe, simply type in the topic name and click the *Subscribe* button. **After subscribing, messages published to the topic |
| 4 |
will appear in the web app, and pop up as a notification.** |
| 5 |
|
| 6 |
<div id="subscribe-screenshots" class="screenshots"> |
| 7 |
<a href="../../static/img/web-subscribe.png"><img src="../../static/img/web-subscribe.png"/></a> |
| 8 |
</div> |
| 9 |
|
| 10 |
## Publish messages |
| 11 |
To learn how to send messages, check out the [publishing page](../publish.md). |
| 12 |
|
| 13 |
<div id="web-screenshots" class="screenshots"> |
| 14 |
<a href="../../static/img/web-detail.png"><img src="../../static/img/web-detail.png"/></a> |
| 15 |
<a href="../../static/img/web-notification.png"><img src="../../static/img/web-notification.png"/></a> |
| 16 |
</div> |
| 17 |
|
| 18 |
## Topic reservations |
| 19 |
If topic reservations are enabled, you can claim ownership over topics and define access to it: |
| 20 |
|
| 21 |
<div id="reserve-screenshots" class="screenshots"> |
| 22 |
<a href="../../static/img/web-reserve-topic.png"><img src="../../static/img/web-reserve-topic.png"/></a> |
| 23 |
<a href="../../static/img/web-reserve-topic-dialog.png"><img src="../../static/img/web-reserve-topic-dialog.png"/></a> |
| 24 |
</div> |
| 25 |
|
| 26 |
## Notification features and browser support |
| 27 |
|
| 28 |
- Emoji tags are supported in all browsers |
| 29 |
|
| 30 |
- [Click](../publish.md#click-action) actions are supported in all browsers |
| 31 |
|
| 32 |
- Only Chrome, Edge, and Opera support displaying view and http [actions](../publish.md#action-buttons) in notifications. |
| 33 |
|
| 34 |
Their presentation is platform specific. |
| 35 |
|
| 36 |
Note that HTTP actions are performed using fetch and thus are limited to the [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) |
| 37 |
rules, which means that any URL you include needs to respond to a [preflight request](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) |
| 38 |
with headers allowing the origin of the ntfy web app (`Access-Control-Allow-Origin: https://ntfy.sh`) or `*`. |
| 39 |
|
| 40 |
- Only Chrome, Edge, and Opera support displaying [images](../publish.md#attachments) in notifications. |
| 41 |
|
| 42 |
Look at the [Notifications API](https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API#browser_compatibility) |
| 43 |
for more info. |
| 44 |
|
| 45 |
## Background notifications |
| 46 |
While subscribing, you have the option to enable background notifications on supported browsers (see "Settings" tab). |
| 47 |
|
| 48 |
Note: If you add the web app to your homescreen (as a progressive web app, more info in the [installed web app](pwa.md) |
| 49 |
docs), you cannot turn these off, as notifications would not be delivered reliably otherwise. You can mute topics you don't want to receive |
| 50 |
notifications for. |
| 51 |
|
| 52 |
**If background notifications are off:** This requires an active ntfy tab to be open to receive notifications. |
| 53 |
These are typically instantaneous, and will appear as a system notification. If you don't see these, check that your browser |
| 54 |
is allowed to show notifications (for example in System Settings on macOS). If you don't want to enable background notifications, |
| 55 |
**pinning the ntfy tab on your browser** is a good solution to leave it running. |
| 56 |
|
| 57 |
**If background notifications are on:** This uses the [Web Push API](https://caniuse.com/push-api). You don't need an active |
| 58 |
ntfy tab open, but in some cases you may need to keep your browser open. Background notifications are only supported on the |
| 59 |
same server hosting the web app. You cannot use another server, but can instead subscribe on the other server itself. |
| 60 |
|
| 61 |
If the ntfy app is not opened for more than a week, background notifications will be paused. You can resume them |
| 62 |
by opening the app again, and will get a warning notification before they are paused. |
| 63 |
|
| 64 |
| Browser | Platform | Browser Running | Browser Not Running | Restrictions | |
| 65 |
|---------|----------|-----------------|---------------------|---------------------------------------------------------| |
| 66 |
| Chrome | Desktop | ✅ | ❌ | | |
| 67 |
| Firefox | Desktop | ✅ | ❌ | | |
| 68 |
| Edge | Desktop | ✅ | ❌ | | |
| 69 |
| Opera | Desktop | ✅ | ❌ | | |
| 70 |
| Safari | Desktop | ✅ | ✅ | requires Safari 16.1, macOS 13 Ventura | |
| 71 |
| Chrome | Android | ✅ | ✅ | | |
| 72 |
| Firefox | Android | ✅ | ✅ | | |
| 73 |
| Safari | iOS | ⚠️ | ⚠️ | requires iOS 16.4, only when app is added to homescreen | |
| 74 |
|
| 75 |
(Browsers below 1% usage not shown, look at the [Push API](https://caniuse.com/push-api) for more info) |