The http-equiv HTML metatag
Default Style
The http-equiv="default-style" metatag specifies the default
style sheet for the page. For example, this could be a site-wide template:
Examples
<meta http-equiv="default-style" content="/site-template.xsl ; type=application/xslt+xml"/>
Meta Refresh
The http-equiv="refresh" metatag can be used to refresh the current page
at regular intervals or redirect to a different page after a given period of time.
The first parameter of content is the time to wait, in seconds.
The second parameter is the URL of the next page to be displayed and is optional.
Examples
<meta http-equiv="refresh" content="10"/>
<meta http-equiv="refresh" content="0;http://www.ExampleOnly.com/"/>
http-equiv Metatag for Other HTTP Headers
Other frequently used http-equiv metatags for HTTP headers include:
-
Cache-Control
- which indicates how long the page should remain in the client's cache
-
Content-Disposition
- which indicates how or when the content should be displayed
-
Content-Type
- which indicates how the document is encoded, in terms of
both the character encoding used and the syntax of the content.
-
Expires
- which is an alternative way of indicating when the content should expire from cache
-
X-UA-Compatible
-
X-UA-Compatible is used to indicate to an IE browser
which version of the rendering engine should be used to display the page.
This metatag does not affect other browsers such as Firefox and Opera,
which in general attempt to avoid bloating the size of the browser code
by displaying web pages only one way according to established standards.
(Supporting multiple rendering engines presents some major challenges, especially when
content rendered by one engine accesses embedded content rendered by a different engine).
Examples
<meta http-equiv="Cache-Control" content="no-cache"/>
<meta http-equiv="Cache-Control" content="max-age=120"/>
<meta http-equiv="Content-Disposition" content="inline; filename=spreadsheet.xls"/>
<meta http-equiv="Content-Type" content="application/xhtml+xml;charset=UTF-8"/>
<meta http-equiv="Expires" content="Day, dd Mon yyyy hh:mm:ss GMT"/>
<meta http-equiv="X-UA-Compatible" content="IE=8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
Differences between HTML 5 and earlier versions
-
http-equiv="Content-Language" has been deprecated.
The lang attribute
should be used instead.
back to top
|