- [Instructor] We are back in our code.…In this case, I am loading the project at 0209 begin.…I am in the index HTML.…And we're going to start adding in our HTML the button…that we'll call an update function that would try to force…an update check.…Let's call this update check.…So we integrate that function.…So, inside the script tag, we can also create an external…script tag for this.…
We're going to create the function update.…In this case, we need the registration.…We're going to ask for navigator service worker…get registration.…Remember, this is a promise.…So we will get the registration object in the call back.…And in this case, we're going to call registration update.…This will fire the checking algorithm,…that byte by byte comparison.…Then, in our code, we already have an event listener…when an update was found.…
And here we were looking for the current state of the new…service worker.…That in this case it can installed or activated.…So, when it's installed for example,…we can change our output and say that a new service…
- 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.