Question

I can't find any case where someone doesn't want to put all their URLs in the NETWORK: section:

NETWORK: *

If a resource isn't in the CACHE: section, nor in the NETWORK: section, the resource won't be loaded. But if a resource is not in CACHE: but is in the NETWORK: section, at least it will be loaded in the case the user is online!

Was it helpful?

Solution

The NETWORK section allows you to white list only resources that you trust. It is a security measure. As such it is useful also for pure online apps, i.e. apps that do not make use the other two sections (CACHE, FALLBACK).

Quote from MDN (as of 2012-10-28 CEST, with emphasis by me):

Network entries in an application cache are essentially an "online whitelist"—URIs specified in the NETWORK section are loaded from the server instead of the cache. This lets the browser's security model protect the user from potential security breaches by limiting access to approved resources.

OTHER TIPS

Yes, you are correct. Below is the perfect answer i found:-

 A manifest can have three distinct sections: CACHE, NETWORK, and FALLBACK.

CACHE:
This is the default section for entries. Files listed under this header (or immediately     after the CACHE MANIFEST) will be explicitly cached after they're downloaded for the first time.
NETWORK:
Files listed under this section are white-listed resources that require a connection to the server. All requests to these resources bypass the cache, even if the user is offline. Wildcards may be used.
FALLBACK:
An optional section specifying fallback pages if a resource is inaccessible. The first URI is the resource, the second is the fallback. Both URIs must be relative and from the same origin as the manifest file. Wildcards may be used.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top