7. Offline Content & Background Jobs
• is a component of JavaScript code
• works as a proxy between the browser and the network
• runs in the background on a separate thread (no blocking)
• works only on secure connections (localhost is considered secure)
service workerA :
14. Service Workers In Angular
With angular-cli (1.6+) we can easily turn an existing application into a PWA:
Two new files are added to our project:
• ngsw-config.json
• manifest.json
15. A Basic Angular PWA
https://github.com/pacoita/angular-pwa-boilerplate
16. How can we do
better?
CACHE API allows to cache only GET Request…
18. Cloud Firestore
• Out of the beta release (Oct 2017 → Jan 2019)
• NoSQL Database
• Real-time data updates (3-way binding)
• Offline support for mobile (iOS/Android) and web
21. Push Notifications Success Rules
Send meaningful informationSend meaningful information Send meaningful information ☺
22. Push Notifications Failure Reasons
It’s timely: The user’s behavior, location, or preference
triggers the notification.
It’s personal: The content of the push appeals to the user
as an individual
It’s actionable: The push makes it clear what the user
should do next.
23. Voluntary Application Server Identification (VAPID)
Cryptographic public/private key pair:
{
"publicKey": "BLBx-qEa0qKbGDTyyP9KTS5K7ZL0K7TfmOKSPqp8vQF0DaG8hpSBknz_x3qEFo",
"privateKey": "PkVHOUKgY29NM7myQXXoGbp_bH_9j-cxW5cO-fGcSsA"
}
Public key: used as a identifier for subscribing the user to notifications sent by our server
Private key: used by the server to sign messages, before sending them to the Push Service