- [Instructor] Let's continue with the project.…Now looking into the response constructor.…The response constructor accepts a body…that can be in a string.…That's exactly what we did here.…But it can also be blocks or binary data,…a buffer, or a stream of information.…Most important, we have a second argument that is an object…where we can set some additional information.…For example, the status code.…Typically if the request is okay,…we're going to respond with 200,…but it can be 404, 500, 301, or 302 for redirects.…
So any HTTP is status code.…We can also specify the status text,…which is the text that goes with that code.…For example, OK, in this case.…And also we have header,…that's probably the most important property here.…Header is typically an object…where we can set several headers.…For example, I can specify that now I'm going to send…content-type": "text/html".…So now instead of rendering just text, I can render HTML…or I can render binary data, such as e-machines,…videos, or anything that we want.…
But now that we can create HTML,…
- 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.