- [Instructor] When we have activated serviceworker…we know it's not alone.…We know we have clients such as browser's tabs,…or Windows, PWAs…or other items such as iFriends.…So fortunately we do have a communication API…that will let us send messages from pages…to the serviceworker and vice versa.…So let's start sending messages to the servicworker…from Windows.…And there we have an app.js file…that's a (mumbles) file that is currently registering…the serviceworker and that file is pointing from every HTML.…
Remember that if we are registering again…a serviceworker that is already installed…nothing will happen.…So from there we can have for example, a function…that will send a message to the serviceworker.…We can receive a message and this is pretty simple.…In fact it's based on the web worker messaging API.…So we say navigator.serviceWorker….controller…so that's the actual serviceworker….postMessage.…
So it's the same post message…that probably you have seen before.…And we can send the message, that's all.…One important thing here remember that the controller…
- Service worker life cycle
- Registering service workers
- Handling service worker events
- Updating service workers
- Acting as a network proxy
- Configuring cache storage
- Communicating with clients
- Optimizing web performance
Skill Level Advanced
Web Portfolio Projects: Binding and Propagationwith Leigh Lawhon1h 9m Intermediate
1. A New Citizen for the Web
2. Work with Service Workers
3. Acting as a Network Proxy
4. Cache Storage
5. Work with APIs in the Service Worker
6. Tips and Tricks for Web Performance
Next steps1m 55s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.