- [Instructor] I am back with the project…Explore California, and please now load…05_06, because there is something new.…When you open the Tours section, the Tours HTML,…we are going to see that there are…a couple of California tours here…and you can vote for the tour that you like.…Let's see what's happening when I click on that button.…If I click I can see a vote here in the console,…but let's see the whole process.…So, going back into the code, I'm opening tours.html,…you can see that each tour has a button…that onclick it's calling a vote function…with a number, it's like an Id.…
Now I'm going to app.js, and here we can see the function.…It's doing a fetch to a URL, sending the Id,…and when it's done it's taking the json…from that response and just saying 'voted!'.…That's all, but there is a problem here.…That fetch might take time, or even we might be offline,…so if I'm offline, if I click here, Offline,…and now I try to vote we have an error…because yeah, the promise was rejected.…
I'm not catching that problem.…
- 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 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.