The most common use case would be to have a service worker compare a previously cached response with a response from the network, so that you can let pages know that updated data was received.
Note that the comparison is done via one or more headers, not response bodies,
for efficieny's sake. Also note that cross-origin responses using the
protocol only expose a subset of response headers. The remote server needs to
explicitly whitelist headers by setting
or the headers won't be visible on the CORS response.
, which will trigger a
BroadcastChannel API message whenever the
header differs from the
Date: in the cached entry.