In this chapter, we saw how the Fetch and Cache APIs are critical for the service workers. To get the most out of service workers, you need to be able to intercept and manipulate requests and the server responses. Because service workers rely on asynchronous functions (Promises), you must use Fetch, as a new replacement for XMLHttpRequest.
The Cache API provides a new storage medium in the browser, which is highly specialized for request/response pairs. The API is a rich platform, providing the maximum amount of control over network resources.
Your goal is to use the best logic and platform resources to make your website load quickly and work offline. Now that you know how the Fetch and Cache APIs work, it's time to start crafting the best caching system you can.
In the next chapter, we will review different caching patterns and start seeing how they can be applied...