From the course: JavaScript: Progressive Web Applications
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Sending data in a push message - JavaScript Tutorial
From the course: JavaScript: Progressive Web Applications
Sending data in a push message
- [Instructor] The use case for our PWA is pretty much fully implemented. The combination of the service worker and push notifications allow us to reengage users whenever we have any new content to show them. And we can send a tickle any time we simply want to be visible again on the user screen. If there's new content, almost certainly we'll want to update the cache to include it. This means we'll need to modify the service worker. If we're gonna do that, we can always modify the notification in the push event handler as the service worker's going to be updated anyway. That way, for example, if we were to implement a new program, we could switch the load property to point to the program's location in the app instead of the info location. There may however be times when you want to send data along with a push message, and then display that data to the user in a notification. The classic example is an email app. You wouldn't want a generic push notification sent. Although that might…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Introduction to notifications2m 21s
-
(Locked)
Requesting permission to show notifications5m 26s
-
(Locked)
Displaying a notification4m 50s
-
(Locked)
Adding data to a notification4m 36s
-
(Locked)
Closing a notification3m 33s
-
(Locked)
Handling the notification click event11m 25s
-
(Locked)
Push messaging overview1m 24s
-
(Locked)
Adding Firebase Cloud Messaging to the project2m 15s
-
(Locked)
Subscribing to push messaging6m
-
(Locked)
Handling push notifications3m 14s
-
(Locked)
Sending a tickle using cURL4m 57s
-
(Locked)
Sending data in a push message2m 9s
-
(Locked)
Installing Mozilla's Web Push library2m 51s
-
(Locked)
Modifying the push event handler2m 52s
-
(Locked)
Modifying the notification click event3m 48s
-
(Locked)
Creating the web push script6m
-
(Locked)
Testing the hosted app5m 7s
-
(Locked)
-
-