Instructor: In the sw.js file, let's register another route, this time for any JSON network call from our back-end server. We'll pick a network-first cache strategy, which will always try to hit the network first and only reach into the cache if it can't get to the server or the network.
This is important for things like API calls, where we always want to have the very latest information. Then we can build and serve that and reload in Chrome with the network tab open. If we go off-line now and reload, the list works.
We can see that network request tried but failed first. Then it went to the old cached results from the service worker.
Back in the service worker file, we matched the entire local host URL. But in production, that might be /*.json, for example, depending on how we call it from our application.