In this chapter, we will look at how to request files and resources from different sources, which in more technical terms perform fetch actions against different resources. We will look at fetching a JSON file during the service worker installation, using the service worker as a proxy middleware, and prefetching a list of specific resource URLs during the installation process, so that you have the resources handy before loading the page.
Let's start off this chapter by looking at a simple example of fetching a resource from two different resources.