- [Instructor] Back in our project,…I'm currently inside the serviceworker.js file.…It is currently empty.…The first part to create an offline experience…is to pre-cache or to cache all the files…that we will need later…when we don't have a connection.…To do that, we're going to work with CacheStorage API…and we're going to use the install event,…so we're going to listen for the install event…of the serviceworker.…
Inside this event, we are going to access…the CacheStorage API…and we can use the CacheStorage API…using the caches object…and from here we are going to open a new cache.…Open will create that cache,…remember the cache is like a folder.…We'll create that cache if it's not there…and if it's there, it's just going to open it.…Open, we receive just a cacheName.…Any name will work, for example, california-assets.…
It's usually a good idea to version…our CacheStorages, like for example,…version one because in the future,…we might want to create another version…of the same website or the same app.…In that case, maybe the assets are different…
- 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.