July 2018
Intermediate to advanced
354 pages
8h 51m
English
When a request returns from the network, you can intercept this part of the fetch process and handle it based on your application's logic. The most common thing to do is to cache the response while returning a copy to the client.
This also extends the core pattern of on-demand asset caching. It's important to note that when you intercept a request from the network, you should clone the response before caching it. A response can only be used once:

The clone method creates a deep copy of the response, allowing you to do something else with the response. The most common use of the clone method is to create a copy so that one ...
Read now
Unlock full access