Connecting browsers
A browser receives a recipient's notifications only after a person clicks to allow it.
A browser joins a recipient only after a person clicks Enable notifications (or Connect this browser in the dashboard) and then allows notifications in the browser's own prompt. Push never asks for permission when a page loads. This deliberate opt-in is what keeps Push from being a spam channel.
There are two ways to connect a browser:
- Connect this browser from the dashboard, for your own devices.
- Connect links, for someone else's browser or your phone.
Connect this browser#
On a recipient's page in the dashboard, click Connect this browser and allow notifications. It is the fastest way to connect the browser you are using. It needs a verified email address and does not use up a connect link.
Connect links#
To connect someone else's browser, or your own phone, create a connect link on the recipient's page and send it to that person. A link looks like this:
⫻
connect link
- The token is
cl_followed by 32 letters and digits. The link is shown once, when you create it; Push keeps only a hash. - By default a link lasts 168 hours (7 days) and allows 5 uses. In the dashboard you can choose 1 hour, 1 day, 7 days or 30 days, and up to 100 uses.
- Each successful connect uses one use. Connecting the same browser to the same recipient again refreshes that browser instead of adding a new one.
- You can revoke a link at any time. Browsers already connected through it stay connected.
- A recipient can have up to 20 links that are neither expired nor revoked. Links that are used up still count until they expire.
The connect page shows the project and recipient names, checks what the browser supports and only then offers Enable notifications. When the person allows it, the browser is connected and starts receiving notifications.
Where notifications come from#
- Notifications show as coming from
meslzy.com, because that is the site the person allowed. That address never changes, so connected browsers stay connected. - Each recipient gets its own service worker scope in the browser, so one browser can join several recipients, even across projects, without one replacing another.
- Each project signs its messages with its own key pair.
iPhone and iPad#
On iOS and iPadOS 16.4 or later, web notifications work only from a page added to the Home Screen. Every browser on iOS uses Safari's engine, so the same steps apply in Chrome, Firefox or Edge there. The connect page walks the person through it:
- Open the connect link in Safari.
- Tap the Share button, then Add to Home Screen.
- Open the page from its new Home Screen icon.
- Tap Enable notifications and allow them.
Older iOS versions cannot receive web notifications. See Browser compatibility.
When a browser disconnects#
Push stops sending to a browser, and marks it disconnected, when:
- The person clicks Disconnect on the connect page, or you disconnect the browser in the dashboard.
- The browser vendor's push service reports that the subscription is gone (HTTP
404or410). The attempt that found this ends asinvalid_subscriptionand leaves the month's count. - The browser replaces its push subscription. The service worker then disconnects that browser itself.
Blocking notifications in the browser's site settings stops them from showing. Push finds out only when the push service reports the subscription as gone. To connect a browser again, use a new connect link or Connect this browser.
Connection errors#
| Code | HTTP | When |
|---|---|---|
| NOT_FOUND | 404 | The connect link is unknown, expired, revoked or used up, or its project is suspended. |
| FORBIDDEN | 403 | The recipient already has 20 connected browsers, or the account has 100. |
| INVALID_SUBSCRIPTION | 422 | The browser's push subscription is malformed, or its push service is not a supported vendor. |
| RATE_LIMITED | 429 | Too many connect requests from one IP address. See Rate limits. |