Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Aggressive Web Apps at Front End London

Phil Nash
August 31, 2017

Aggressive Web Apps at Front End London

Push notifications on the web can be a force for good, but is that how they are coming across? We'll take a look at how push notifications permissions are being implemented and how we can do it better. We'll then look at the notifications themselves, find out what the best kind of notifications are and how not to wind up with your app's, or the entire web's, notifications blocked forever.

--

Links:
CanIUse Push Notifications? http://caniuse.com/#search=push
Push notification documentation from Google: https://developers.google.com/web/fundamentals/engage-and-retain/push-notifications/
Permissions UX: https://developers.google.com/web/fundamentals/engage-and-retain/push-notifications/permission-ux
That Slack flow chart tweet: https://twitter.com/mathowie/status/837735473745289218
How to stop websites from asking to show notifications 😱: https://www.howtogeek.com/288946/how-to-stop-websites-from-asking-to-show-notifications/

The Guardian on Web Push Notifications: https://medium.com/the-guardian-mobile-innovation-lab/tagged/web-notifications
The Guardian on generating images in JavaScript without canvas for notifications : https://medium.com/the-guardian-mobile-innovation-lab/generating-images-in-javascript-without-using-the-canvas-api-77f3f4355fad

Phil Nash

August 31, 2017
Tweet

More Decks by Phil Nash

Other Decks in Programming

Transcript

  1. window.addEventListener('load', ev => { if ('serviceWorker' in navigator && 'PushManager'

    in window) { navigator.serviceWorker.register('/sw.js').then(reg => { reg.pushManager .subscribe({ userVisibleOnly: true }) .then(subscription => { console.log('Push subscription successful!'); }); }); } });
  2. SMS