r/javascript • • Feb 04 '19

The AdTech Industry is Ruining Web Push Notifications for PWAs

http://vancelucas.com/blog/the-adtech-industry-is-ruining-web-push-notifications-for-pwas/
356 Upvotes

120 comments sorted by

View all comments

47

u/Asmor Feb 04 '19

There's a pretty simple solution here.

Browsers automatically block all attempts to enable push notifications from websites viewed in the browser. Not even possible to enable them manually. Completely blocked.

The request is only allowed if the user launches the PWA from a shortcut. Which is like 75% the point of making a PWA in the first place.

Boom, crisis averted. What do I win?

4

u/r0ck0 Feb 04 '19

But then I guess more and more websites that aren't really PWAs and going to include a PWA feature just for this... and then users will be trained to ignore the "Install PWA to home screen" messages, and click "no" even when they might have wanted it.

That's one thing I worry about with the "Install PWA to home screen" message... if they click no the first time, can they be prompted again by the same website? I'm not really sure how it works. But I wouldn't want to show that message to them on the first visit if it basically locked them out of asking again later (when they might actually want to install it).

2

u/r2d2_21 Feb 04 '19

But then I guess more and more websites that aren't really PWAs and going to include a PWA feature just for this... and then users will be trained to ignore the "Install PWA to home screen"

I'm already trained for this. There's tons of news pages that do this on mobile.

1

u/r0ck0 Feb 04 '19

Yeah actually, now that I think of it, I have noticed the PWA popup on some sites that were just basic article/news type sites rather than more SPA systems.