These days we have investigated an issue related to Safari.
Sometimes it happens that you subscribe to the push notifications of a website, but after some time you don’t receive notifications anymore.
At first we thought that our system had a bug, but it’s not like that. We have been able to reproduce this issue on many competitors that offer a public demo and some research on Google (“safari push notifications not working”) shows that this issue it’s a Safari bug (on Yosemite and El Capitan). So no one can fix this except Apple itself.
We hope to see it fixed on macOS Sierra.
Workaround for users: you can easily resubscribe to the push notifications of a website by going to Safari -> Preferences -> Notifications and removing permission for that website. Than visit the website again and repeat the steps that you made to subscribe to push notifications.
Technical details: the device token remains the same even after you resubscribe and notifications start working again: this indicates that the bug it’s not caused by an expired token (our first guess). Also Safari doesn’t send any log message to the push service which has no way to detect that failure. Probably Safari doesn’t register properly to APNs on startup, loses the push package or APNs forgets tokens after some time.
Looks like this issue is solved now. It’s more than a month that we cannot reproduce this bug.
I guess that Safari tries to download the push package again after some time (in order to update it), but it uses a different code for downloading the push package. In some rare circumstances this may result in a package that is successfully downloaded the first time, but not on the next updates.
2 thoughts on “Safari push notifications stop working after some time”
Hello, I already implemented push notification on my website but if i check google pagespeed google said “Please minify pushpad.js”. Could you fix it?
It’s a very lightweight file, even not compressed, so there shouldn’t be any impact on performance or bandwidth. It’s uncompressed for easier debugging. However I’ve added your suggestion to the TODO list, thanks!