How to throttle notifications to user (and reduce cost)

Some kinds of applications, such as chats, may create a lot of push notifications in a small amount of time. Sometimes you just want to notify every single message, but other times might be better to reduce the number of notifications. Continue reading “How to throttle notifications to user (and reduce cost)”

How to send single-user targeted notification with Web Push API

I would like to reply to an interesting question that has been posted on StackOverflow. I reply here because the original question has been deleted. Continue reading “How to send single-user targeted notification with Web Push API”

Let’s ask Apple to add Web Push Notifications to iOS

We’ve all been there: you have built a great web app, optimized for mobile, but you have to build a native or hybrid web app just to send push notifications.

Fortunately, thanks to the new standards, like the Push API, Service Workers and Web Notifications, you don’t have to build an app only to have the ability to send push notifications. Now websites can send push notifications directly, even when the user is not surfing the website.

Awesome! The problem is that web push notifications work on Android, but not on iOS! Continue reading “Let’s ask Apple to add Web Push Notifications to iOS”

Update the service worker and the scripts imported with importScripts

If you change the Javascript code of a service worker, the browser may not  apply the update immediately (as we have already discussed).

In order for the update to take effect you need to:

Continue reading “Update the service worker and the scripts imported with importScripts”