Middle
Describe the Cache, Network, and Fallback sections in the cache manifest file.
sobes.tech AI
Answer from AI
CACHE MANIFEST — the mandatory first line.
CACHE: — list of files that the browser should cache for offline use.
NETWORK: — list of resources that should always be loaded from the network (not cached).
FALLBACK: — pairs of URLs. If the first URL (resource) is unavailable, the browser uses the second URL (fallback resource).
Example of a .appcache manifest file structure:
CACHE MANIFEST
# Cache version
# v1.0
CACHE:
index.html
style.css
script.js
images/logo.png
NETWORK:
api/data.json # This resource always loads from the network
* # Any other resources not listed in CACHE or FALLBACK also load from the network
FALLBACK:
/offline.html /fallback/generic.html # If offline.html is unavailable, load fallback/generic.html
/assets/ /fallback/assets/ # If a resource in /assets/ is unavailable, try to load from /fallback/assets/