ArticleslgStudy

computer science

Cache manifest in HTML5

Cache manifest in HTML5 is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Cache manifest in HTML5 rather than just read about it. In short: The cache manifest in HTML5 is an obsolete web browser feature which provided the ability to access a web application even without a network connection. It became part of the W3C Recommendation on 28 October 2014.

Key takeaways

  • Cache manifest in HTML5 belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Cache manifest in HTML5 to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Cache manifest in HTML5 from memory before moving on to harder problems.

Reference excerpt

The cache manifest in HTML5 is an obsolete web browser feature which provided the ability to access a web application even without a network connection. It became part of the W3C Recommendation on 28 October 2014. Web pages could specify static cache manifests listing all resources used by the page. The browser could download every resource in advance and store it for offline use. In practice, the simple and rigid declarative nature of the format worked well only for very simple pages, falling apart for many interactive websites. In response to this demand, Google Chrome 40 introduced Service Worker API which allows websites to create programmable caches aware of the specifics of its main application logic. Shortly after introduction or Service Workers, browsers deprecated cache manifests. Since 2021, cache manifests are no longer widely available. Browser vendors recommend using service workers instead. Cache manifests are distinct from web application manifests, a different technology which aims to improve discoverability of progressive web apps and associated metadata.

Overview Cache manifests enabled web pages to statically declare all resources used by the page. The browser could download every resource in advance and store it for offline use. In practice, the simple and rigid declarative nature of the format worked well only for very simple pages. Many interactive websites and single page required a dynamic, programmable storage logic. In response to this demand, Google Chrome 40 introduced Service Worker API which allows websites to register a script which runs in the user's browser and functions like a proxy (or a middleman) between the visible page and the network. Such Service Workers provide a programmable cache aware of the specifics of its main application logic, has access to information about user's current network connection and can support explicit invocations by the user. Shortly after introduction or Service Workers, browsers deprecated cache manifests. Since 2021, this technology is no longer widely available. It was removed from Firefox 85, and disabled by default in Chrome 84 and removed in Chrome 95. Using any of the offline Web application features at this time is highly discouraged and use of service workers is recommended instead. Cache manifests are distinct from web application manifests, a JSON-based file format which is part of the progressive web app technology, and as of 2026 is currently active and going through the standardization process at the W3C.

Background Web applications consist of web pages that need to be downloaded from a network. For this to happen there must be a network connection. However, there are many instances when users cannot connect to a network due to circumstances beyond their control. HTML5 provides the ability to access the web application even without a network connection using the cache manifest. Web applications consist of resources identified by URLs. These can be HTML, CSS, JavaScript, images or any other source that is required for a web application to be rendered. Their addresses can be copied into a manifest file, which can be updated regularly by the author of the web application, indicating any new web addresses that are added or deleted. When connecting to a network for the first time, a web browser will read the HTML5 manifest file, download the resources given and store them locally. Then, in the absence of a network connection, the web browser will shift to the local copies instead and render the web application offline.

Basics In order for the offline applications to work, a cache manifest file must be created by the web developer. If the web application exceeds more than one page then each page must have a manifest attribute that points to the cache manifest. Every page referencing the manifest will be stored locally. The cache manifest file is a text file located in another part of the server. It must be served with content type text/cache-manifest The attribute manifest="<path>" must be added to the html element in order for the cache manifest file to work. Example:

The argument to the manifest attribute is a relative or absolute path to the manifest file. Consider the HTML file given below. The <html> element indicates a file named cache.appcache will contain the list of resources (i.e., test.js, test.css) needed for this web page to work offline. Common names for this file are cache.manifest and manifest.appcache.

Syntax The manifest file must start with the line CACHE MANIFEST. Comments start with a #, spaces and blank lines are ignored. Given below is an example of a cache manifest file. Example 1:

CACHE MANIFEST /test.css /test.js /test.png

This manifest file lists three resources: a CSS file, a JavaScript file and a PNG image. When the above file is loaded, the browser will download the test.css, test.js and test.png files from the root directory in the web server. As a result, whenever one's network is not connected, the resources will be available to them offline. Cache manifests can also use relative paths or even absolute URLs as shown below. Example 2:

CACHE MANIFEST /main/features.js /main/settings/index.css http://files/images/scene.jpg http://files/images/world.jpg

File headers The cache manifest file consists of three section headers.

Explicit section with the header CACHE. Online whitelist section with the header NETWORK. Fallback section with the header FALLBACK. Note: Example 1 and Example 2 above, do not indicate any section header and are therefore considered an explicit section by default.

Online whitelist section with the header NETWORK Example 3:

CACHE MANIFEST NETWORK: /checking.cgi CACHE: /test.css /test.js /test.png

This example consists of headers. The line, NETWORK: is the start of the "online whitelist" section. The resources listed under this section are never cached and are not available offline. As a result, an error will occur when an attempt is made offline to load the resource. There is a shift to the explicit section by the header CACHE: and the resources (the CSS stylesheet, JavaScript and the image file) can be downloaded and used offline.

Fallback section with the header FALLBACK The fallback section in a cache manifest file can be used to substitute online resources that cannot be cached or were not cached successfully. Example 4:

CACHE MANIFEST FALLBACK: / /offline.html NETWORK: ...

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Cache manifest in HTML5

Start with the simplest possible case. Write down what Cache manifest in HTML5 claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Cache manifest in HTML5 before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Cache manifest in HTML5 ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Cache manifest in HTML5

In research
Cache manifest in HTML5 appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Cache manifest in HTML5 in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Cache manifest in HTML5 is common in secondary-school and first-year university syllabi. It links to neighbouring topics Cache (computing), HTML5, so understanding it makes those chapters shorter.
In everyday life
Look for Cache manifest in HTML5 outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Cache manifest in HTML5” →

How to study Cache manifest in HTML5 in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Cache manifest in HTML5 means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Cache manifest in HTML5 out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Cache manifest in HTML5 in simple terms?

The cache manifest in HTML5 is an obsolete web browser feature which provided the ability to access a web application even without a network connection. It became part of the W3C Recommendation on 28 October 2014.

Why does Cache manifest in HTML5 matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Cache manifest in HTML5?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Cache manifest in HTML5.

Tags

  • Cache (computing)
  • HTML5

Keep exploring