HTML <html> manifestAttribute

HTML html 标签参考手册HTML <html> Tag

Example

HTML document with a cache manifest (for offline browsing):

<!DOCTYPE HTML>
<html manifest="demo.appcache">
<head>
<title>Document title</title>
</head>

<body>
Document content......
</body>

</html>

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Internet Explorer 10, Firefox, Opera, Chrome, and Safari support the manifest attribute.

Note:Internet Explorer 9 and earlier versions do not support the manifest attribute.


Definition and Usage

The manifest attribute specifies the location of the document's cache manifest.

HTML5 introduces application caching, which means that web applications can be cached and then accessed without an internet connection.

Application caching gives applications three advantages:

  1. Offline browsing - users can use the application while offline
  2. Speed - cached resources load faster
  3. Reduced server load - the browser only downloads updated/changed resources from the server

The manifest attribute should be included on every page in the web application that you want to cache.

The manifest file is a simple text file that lists the resources the browser caches for offline access.

To learn more about how to create a manifest file, read ourHTML5 Application Cachechapter.


Differences between HTML 4.01 and HTML5

The manifest attribute is a new attribute in HTML5.


Syntax

<html manifest="URL">

Attribute Value

Value Description
URL The address of the document's cache manifest.

Possible values:

  • Absolute URL - points to another website (e.g., href="http://www.example.com/demo.appcache")
  • Relative URL - points to a file within the website (e.g., href="demo.appcache.html")


HTML html 标签参考手册HTML <html> Tag Other Extensions