HTML manifest Attribute

Beginner
5 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The manifest attribute on the root <html> element pointed to a cache manifest file (often .appcache) for the old Application Cache API. Listed resources could then load while offline.

The HTML Standard lists it as obsolete: authors must not use it. Use Service Workers for offline caching. Do not confuse it with <link rel="manifest"> (Web App Manifest JSON for PWAs).

Deprecated / obsolete.

Application Cache was removed from major browsers. Learn manifest only to recognize legacy markup and migrate away from it.

HTML Syntax

syntax.html
<html manifest=" url">…</html>

Modern equivalent: register a Service Worker for offline files; optionally add <link rel="manifest" href="…"> for PWA metadata (different feature).

Attribute Values

Historical values (do not use in new work):

ValueDescriptionTry it
URLPath to a cache manifest (e.g. offline.appcache)Try it
Cache manifest fileText file starting with CACHE MANIFEST listing assetsTry it
Modern: rel="manifest"JSON Web App Manifest via <link> — not AppCacheTry it
Modern: Service WorkerHTML Standard replacement for offline cachingTry it

Live Preview

Compare obsolete html manifest with modern link rel="manifest" markup.

pattern

Prefer Service Workers for offline. rel="manifest" is PWA metadata, not AppCache.

Demo
<html lang="en" manifest="offline.appcache">
  …
</html>

Obsolete: browsers no longer run Application Cache for this attribute.

Showing legacy html manifest markup (do not use).

HTML Examples

Short study snippets. Use Try It Yourself for a live editor. Ship only the modern patterns.

Example 1 — Recognize Legacy Markup

Old pages put manifest on <html> and listed files in a cache manifest. Do not copy this into new work.

HTML
<!-- Obsolete — study only -->
<!DOCTYPE html>
<html lang="en" manifest="offline.appcache">
  <head>
    <meta charset="UTF-8">
    <title>Legacy AppCache page</title>
  </head>
  <body>
    <p>AppCache is removed. This attribute no longer caches files.</p>
  </body>
</html>

<!-- offline.appcache (historical format) -->
<!--
CACHE MANIFEST
# v1
index.html
styles.css
app.js

NETWORK:
*

FALLBACK:
/ /offline.html
-->
Try It Yourself

How It Works

  1. Intent. Authors hoped the browser would cache listed files for offline use.
  2. File format. The URL pointed to a text file starting with CACHE MANIFEST.
  3. Reality today. AppCache was removed; the attribute has no useful effect.
  4. Action. When you see it, plan a Service Worker migration and delete the attribute.

Example 2 — Modern link rel="manifest"

This is a different feature: a JSON Web App Manifest for PWA name, icons, and display — not offline AppCache.

HTML
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>PWA metadata</title>
    <link rel="manifest" href="/manifest.json">
  </head>
  <body>
    <p>Install metadata comes from JSON — not from html manifest.</p>
  </body>
</html>
Try It Yourself

How It Works

  1. Place it in head. A <link> points at a JSON (or .webmanifest) file.
  2. rel value. rel="manifest" tells the browser this is a Web App Manifest.
  3. Not AppCache. It does not list offline assets the way .appcache did.
  4. Keep lang. Pair the root lang attribute for accessibility; omit obsolete manifest.

Example 3 — Service Worker Direction

The HTML Standard replacement for AppCache is a Service Worker that caches responses.

HTML
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Offline via Service Worker</title>
  </head>
  <body>
    <p id="status">Checking Service Worker support…</p>
    <script>
      var el = document.getElementById("status");
      if ("serviceWorker" in navigator) {
        el.textContent =
          "Supported. Register a worker (e.g. /sw.js) to cache assets — do not use html manifest.";
        // navigator.serviceWorker.register("/sw.js");
      } else {
        el.textContent = "Service Workers are not available in this environment.";
      }
    </script>
  </body>
</html>
Try It Yourself

How It Works

  1. Spec advice. Obsolete manifest on html → use Service Workers instead.
  2. Feature detect. Check "serviceWorker" in navigator before registering.
  3. Cache in the worker. Offline logic lives in the worker script, not in an .appcache file.
  4. Study next. See navigator.serviceWorker for registration details.

Edge Cases & Pitfalls

Most mistakes come from mixing up AppCache with the Web App Manifest or hoping the old attribute still works.

name clash

Same word, two features

html manifest ≠ <link rel="manifest">. One is removed AppCache; the other is current PWA JSON metadata.

scope

Only on <html>

The obsolete attribute belonged on the document root — never on <link>, <head>, or <body>.

js

JS cannot revive AppCache

document.documentElement.setAttribute("manifest", …) does not restore offline caching in modern engines.

migrate

Replace, don’t stack

Do not keep manifest “for old browsers.” Remove it and implement a Service Worker (and optional Web App Manifest) instead.

mime

Legacy MIME quirks

Historical AppCache files often needed text/cache-manifest. That pipeline is gone; do not reintroduce it for new apps.

Browser Support

manifest on <html> is a legacy HTML attribute tied to Application Cache, which major browsers have removed.

✓ Obsolete · Do not use

manifest

AppCache support was removed (Chrome ~85+, Firefox, Safari, Edge). The HTML Standard: use Service Workers instead. Do not ship html manifest.

Removed Not for new work
Google Chrome AppCache removed
Obsolete*
Mozilla Firefox AppCache removed
Obsolete*
Apple Safari AppCache removed
Obsolete*
Microsoft Edge AppCache removed
Obsolete*
Opera AppCache removed
Obsolete*
Samsung Internet AppCache removed
Obsolete*
Internet Explorer Legacy era only
Legacy*
manifest Obsolete — AppCache removed

Bottom line: *Do not ship html manifest. Use Service Workers for offline caching; use link rel="manifest" only for Web App Manifest JSON.

Key Takeaways

  • Status: obsolete on <html> — omit in new HTML.
  • Replace with: Service Workers for offline; optional link rel="manifest" for PWA JSON.
  • Don’t confuse names: AppCache attribute ≠ Web App Manifest link.
  • Goal: recognize legacy markup, then remove it — browsers already did.

One line: drop html manifest — cache offline with a Service Worker, not Application Cache.

Frequently Asked Questions

On the html element, manifest pointed to a cache manifest file (often .appcache) for the Application Cache API so listed resources could load offline. Application Cache has been removed from modern browsers.
No. The HTML Standard marks it obsolete: authors must not use it. Use Service Workers for offline caching instead.
No. html manifest linked to an AppCache text file (removed). link rel="manifest" links to a JSON Web App Manifest for PWA install metadata — a different, current feature.
Only the root html element. It never applied to link, head, or body.
Register a Service Worker and cache assets from the worker script. Optionally add link rel="manifest" for PWA metadata — that is not AppCache.
No. Setting the attribute in JavaScript does nothing useful today because Application Cache support was removed.

Next: marginheight

Deprecated iframe vertical spacing — use CSS instead.

marginheight tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful