HTML manifest Attribute

Beginner
⏱️ 6 min read
📚 Updated: Jun 2026
🎯 3 Examples
Deprecated & Offline

Introduction

The manifest attribute on <html> was used to point to a cache manifest file (typically *.appcache) for the HTML5 Application Cache (AppCache) API. It let developers list HTML, CSS, JavaScript, and images to cache for offline use. Application Cache is deprecated and removed from all modern browsers. Do not use this attribute in new projects—use Service Workers and the Cache API instead. Also do not confuse it with <link rel="manifest">, which is a separate, modern PWA feature.

What You’ll Learn

01

<html> Only

Root element attribute.

02

AppCache

Legacy offline API.

03

Removed

Not in modern browsers.

04

vs rel=manifest

Different feature.

05

.appcache file

CACHE, NETWORK, FALLBACK.

06

Service Worker

Modern replacement.

Purpose of manifest Attribute

The original purpose of the manifest attribute was to link an HTML document to a cache manifest file. That text file listed resources the browser should store locally so the web app could load when the user was offline or on a slow connection. When the browser saw <html manifest="example.appcache">, it fetched the manifest, cached the listed files, and served them from cache on subsequent visits.

Application Cache had significant design flaws (difficult updates, unpredictable caching behavior) and was superseded by Service Workers. The HTML specification removed the manifest attribute, and browsers dropped AppCache support entirely. You may still encounter it in legacy tutorials or old codebases, which is why it belongs in an attributes reference.

⚠️
Not the same as <link rel="manifest">

The deprecated manifest attribute on <html> pointed to an .appcache file for offline caching. The modern <link rel="manifest" href="manifest.json"> in <head> links to a JSON Web App Manifest for PWA icons, name, and install behavior—it does not replace Application Cache. Offline caching today requires a Service Worker script.

📝 Syntax

Legacy syntax on the root element (shown for recognition only—do not use in new projects):

manifest-legacy.html
<!DOCTYPE html>
<html manifest="example.appcache">
<head>
  <title>Offline Web App</title>
</head>
<body>
  <p>This page linked to a cache manifest.</p>
</body>
</html>

Sample cache manifest file (example.appcache):

example.appcache
CACHE MANIFEST
# Version 1 — resources to cache offline
index.html
styles.css
app.js
logo.png

NETWORK:
*

FALLBACK:
/offline.html

Modern equivalent for offline + installable apps:

modern-pwa.html
<!DOCTYPE html>
<html lang="en">
<head>
  <link rel="manifest" href="/manifest.json">
</head>
<body></body>
<script>
  // Register a Service Worker for offline caching
  navigator.serviceWorker.register("/sw.js");
</script>
</html>

Syntax Rules

  • Historically valid only on the <html> element.
  • Value is a URL (relative or absolute) to a cache manifest file, commonly *.appcache or *.manifest.
  • The manifest file must begin with the line CACHE MANIFEST.
  • Sections: implicit CACHE: (listed files), optional NETWORK: and FALLBACK:.
  • Obsolete—Application Cache removed from HTML and all major browsers.
  • For offline: register a Service Worker; for PWA metadata: use <link rel="manifest">.

💎 Values

The manifest attribute accepted a single URL string pointing to the cache manifest file:

  • manifest="example.appcache" — Relative path to a cache manifest in the same directory.
  • manifest="/cache/app.manifest" — Absolute path from the site root.
  • manifest="https://cdn.example.com/v2.appcache" — Full URL (same-origin rules applied in practice).
  • Attribute absent — No Application Cache linked (normal for modern pages).

Cache Manifest File Sections

  • CACHE MANIFEST (required header) — First line of every manifest file.
  • CACHE: (implicit) — URLs listed after the header are cached for offline use.
  • NETWORK: — URLs that must always be fetched from the network (e.g. * for all).
  • FALLBACK: — Map of online URL to offline fallback page (e.g. / /offline.html).
manifest-js.html
// Legacy dynamic pattern — AppCache no longer runs
document.documentElement.setAttribute("manifest", "dynamic.appcache");

⚡ Quick Reference

Use CaseLegacy (avoid)Modern replacement
Offline HTML/CSS/JS cache<html manifest="app.appcache">Service Worker + Cache API
Cache manifest file*.appcache text filesw.js with caches.open()
PWA app name & iconsN/A (not AppCache)<link rel="manifest" href="manifest.json">
Network-only URLsNETWORK: * in .appcacheService Worker fetch handler
Offline fallback pageFALLBACK: / /offline.htmlService Worker respondWith
Dynamic manifest URLsetAttribute("manifest", url)Update Service Worker registration

Applicable Elements

ElementSupported?Notes
<html>ObsoleteOnly element that ever supported manifest
<head> / <link rel="manifest">Modern (different)Web App Manifest JSON—not the html manifest attribute
<body>, <div>, etc.Nomanifest was never valid on other elements
<script>NoService Workers are registered via JS, not a script attribute

manifest on <html> vs <link rel="manifest">

Featuremanifest on <html><link rel="manifest">
StatusDeprecated & removedActive W3C standard
File typeText cache manifest (.appcache)JSON Web App Manifest
Primary purposeOffline resource caching (AppCache)PWA name, icons, theme, display mode
LocationAttribute on <html><link> in <head>
Offline cachingHandled AppCache (removed)Does not cache files—use Service Worker
Browser support todayNoneAll modern browsers

Examples Gallery

Legacy AppCache markup, modern PWA replacement, and dynamic setAttribute (obsolete pattern).

👀 Live Preview

Structure of a legacy cache manifest file (AppCache no longer runs in browsers):

CACHE MANIFEST
index.html
styles.css
app.js

NETWORK:
*

FALLBACK:
/ /offline.html

Linked from <html manifest="example.appcache">. Listed under CACHE were stored offline; NETWORK: and FALLBACK: controlled other requests.

Example — Offline Web App (Legacy)

Historical pattern linking an HTML page to a cache manifest:

index.html
<!DOCTYPE html>
<html manifest="example.appcache">
<head>
  <title>Offline Web App</title>
</head>
<body>
  <p>This is an example of an offline web application.</p>
</body>
</html>
Try It Yourself

How It Works

When supported, the browser parsed the manifest URL, downloaded listed files into the application cache, and served them on repeat visits even offline. Updates required changing the manifest file and often confused developers—a key reason Service Workers replaced AppCache.

Example — Modern PWA Approach

Today, link a JSON manifest for install metadata and register a Service Worker for offline caching:

modern-offline.html
<!DOCTYPE html>
<html lang="en">
<head>
  <link rel="manifest" href="/manifest.json">
</head>
<body></body>
<script>
  if ("serviceWorker" in navigator) {
    navigator.serviceWorker.register("/sw.js");
  }
</script>
</html>
Try It Yourself

How It Works

The Web App Manifest JSON tells the browser how to install and display the app. The Service Worker intercepts network requests and serves cached responses when offline. These are separate standards from the removed html manifest attribute.

Dynamic Values with JavaScript

Legacy pattern for changing the manifest URL at runtime (no longer effective):

dynamic-manifest.html
<script>
  document.documentElement.setAttribute("manifest", "dynamic.appcache");
</script>
Try It Yourself

How It Works

Developers could point different users or conditions to different cache manifests. Because AppCache is gone, the attribute change has no caching effect. Update Service Worker logic instead for dynamic offline behavior.

♿ Accessibility

  • Offline UX affects all users — When building offline-capable apps, ensure cached content remains accessible (semantic HTML, labels, keyboard support).
  • Announce offline state — Use visible messages or aria-live regions when the app detects loss of connectivity—do not rely on silent cache failures.
  • Do not trap users in stale cache — AppCache often served outdated pages; Service Workers should use versioning strategies so users get updated, accessible content.
  • PWA install prompts — Modern rel="manifest" install flows should be optional and not block core page access.
  • Fallback pages must be accessible — Legacy FALLBACK: pages and modern offline pages need proper headings, contrast, and focus management.

🧠 How manifest Worked (Historical)

1

html manifest URL set

Points to .appcache file.

Markup
2

Browser fetches manifest

Parses CACHE, NETWORK, FALLBACK.

Parse
3

Resources stored locally

AppCache served offline visits.

Cache
=

Offline-capable web app

Replaced by Service Workers today.

Browser Support

Application Cache and the manifest attribute on <html> are removed from all modern browsers. Chrome dropped AppCache in 2020; Firefox, Safari, and Edge followed. The attribute remains in specs only for historical reference.

Removed · Do not use

Application Cache is gone

Use Service Workers for offline caching and <link rel="manifest"> for PWA metadata.

0% AppCache support
Google Chrome Removed (v70+)
Removed
Mozilla Firefox Removed
Removed
Apple Safari Removed
Removed
Microsoft Edge Removed
Removed
manifest attribute / AppCache 0% supported

Bottom line: Never use html manifest in new code. Adopt Service Workers and the Web App Manifest (rel="manifest") instead.

💡 Best Practices

✅ Do

  • Use Service Workers + Cache API for offline resource caching
  • Use <link rel="manifest" href="manifest.json"> for PWA metadata
  • Version and update Service Worker caches explicitly
  • Test offline behavior across browsers and devices
  • Remove legacy manifest attributes when migrating old apps

❌ Don’t

  • Add manifest to <html> in new projects
  • Confuse html manifest with rel="manifest"
  • Rely on *.appcache files for offline support
  • Assume setAttribute("manifest", …) enables caching
  • Skip user-visible offline/error states

Conclusion

The manifest attribute on <html> was a powerful idea for offline web applications—linking pages to cache manifest files through Application Cache. However, AppCache proved difficult to maintain and was removed from browsers and the HTML living standard.

For new projects, use Service Workers for offline caching and <link rel="manifest"> for installable PWA metadata. Understanding the legacy manifest attribute helps you read old code and migrate confidently to modern offline patterns.

Key Takeaways

Knowledge Unlocked

Five truths every developer should know about manifest

Bookmark these before working with offline web apps.

5
Core concepts
⚠️ 02

AppCache removed

0% browser support.

Status
📝 03

Not rel=manifest

.appcache vs JSON.

Compare
⚙️ 04

Service Worker

Modern offline cache.

Replace
📦 05

.appcache sections

CACHE, NETWORK, FALLBACK.

Format

❓ Frequently Asked Questions

It pointed the <html> element to a cache manifest file (.appcache) for the Application Cache API, listing resources to store for offline use. Browsers no longer support Application Cache.
No. The html manifest attribute linked to a text AppCache file (removed). <link rel="manifest"> links to JSON for PWA install metadata—a different, active standard. Offline caching requires Service Workers.
Only the <html> element ever supported it. The attribute is obsolete and should not appear in new markup.
It starts with CACHE MANIFEST, then lists URLs to cache. Optional NETWORK: and FALLBACK: sections control online-only resources and offline fallback pages.
Register a Service Worker with navigator.serviceWorker.register("/sw.js") and use the Cache API inside the worker. Add <link rel="manifest" href="manifest.json"> if you want installable PWA features.
You can write it, but browsers ignore Application Cache. It provides no offline benefit and may confuse maintainers. Remove it and migrate to Service Workers.

Learn legacy AppCache and modern offline patterns

Explore the deprecated manifest attribute, .appcache file format, and Service Worker replacements in the Try It editor.

Try legacy AppCache example →

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.

5 people found this page helpful