The Network-Only Strategy

Learn about the network-only caching strategy.

We'll cover the following

How it works

The network-only caching strategy is the opposite of the cache-only strategy. Instead of relying solely on the service worker to handle network requests, this strategy sends the request directly to the network and returns the response. This is the default behavior of any web application, even without a service worker.

However, it’s also possible to implement this strategy through a service worker by intercepting network requests and responding with a fetch request.

The slides below illustrate this strategy using a service worker.

Get hands-on with 1200+ tech skills courses.