Latest web development tutorials

HTML html manifest attribute

HTML html Tag Reference HTML <html> tag

Examples

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

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

<Body>
Content of the document ......
</ Body>

</ Html>

try it"

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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

Note: 9 and earlier versions of Internet Explorer does not support manifest attribute.


Definition and Usage

manifest cache manifest attribute specifies the location of the document.

HTML5 introduces application cache, which means that Web applications can be cached, and then when no Internet connection to access.

Application cache allows the application has three advantages:

  1. Offline browsing - users can use the application while offline
  2. Fast - cached resources load faster
  3. Reduce server load - the browser only be downloaded from the server has been updated / changed resources

manifest attribute should be Web application caches each page you want to include.

manifest file is a simple text file, include the resource browser to cache for offline access.

To learn more about how to create a manifest file, please read our HTML5 application cache section.


Differences between HTML 4.01 and HTML5

manifest attribute is new in HTML5 attributes.


grammar

<html manifest="URL">

Property Value

描述
URL 文档的缓存 manifest 的地址。

可能的值:

  • 绝对 URL - 指向另一个网站(比如 href="http://www.example.com/demo.appcache")
  • 相对 URL - 指向网站内的一个文件(比如 href="demo.appcache")


HTML html Tag Reference HTML <html> tag