HTTP-EQUIV Attribute | httpEquiv Property Home
HTTP-EQUIV Attribute | httpEquiv Property

Sets or retrieves information used to bind the META tag's content to an HTTP response header.

Syntax

HTML<ELEMENT HTTP-EQUIV = sInformation... >
Scripting[ sInformation = ] object.httpEquiv

Possible Values

sInformationString that specifies or receives the information in the response header. See HTTP Response Headers for a list of possible values.

The property is read/write. The property has no default value.

DHTML expressions can be used in place of the preceding value(s). As of Internet Explorer 8, expressions are not supported in IE8 mode. For more information, see About Dynamic Properties.

Remarks

If the property is omitted, the name property should be used to identify the meta-information. The httpEquiv property is not case-sensitive.

Developers using the httpEquiv and content attributes to refresh web pages from alternate URL's should treat the value of content as untrusted data. For more information, please see Security Considerations: Dynamic HTML.

 New for Windows Internet Explorer 8 

As of Internet Explorer 8, httpEquiv also supports a value of x-ua-compatible, which allows content to specify the document compatibility modes supported by a Web page, using a string containing one or more of the following values.

ValueDescription
IE=8Web page supports IE8 mode, which is also called "IE8 standards mode."
IE=7Web page supports IE7 mode, which is also called "IE7 standards mode."
IE=5Web page supports IE5 mode, which is also called "quirks mode."
IE=EmulateIE8If the Web page specifies a standards-based DOCTYPE directive, the page supports IE8 mode; otherwise, it supports IE5 mode ("quirks mode").
IE=EmulateIE7If the Web page specifies a standards-based DOCTYPE directive, the page supports IE7 mode; otherwise, it supports IE5 mode ("quirks mode").
IE=EdgeWeb page supports the highest mode available to the version of Internet Explorer used to display the page. This option is generally intended for testing purposes.

Internet Explorer displays the page in the highest mode supported by the page. For more information, see Defining Document Compatibility.

Examples

This example causes the browser to reload the document every two seconds.

<META HTTP-EQUIV="REFRESH" CONTENT=2>

This example disables theming support for the document.

<META HTTP-EQUIV="MSTHEMECOMPATIBLE" CONTENT="no">

This example tells Internet Explorer 8 to display a Web page the same way that Internet Explorer 7 displayed it.

<META HTTP-EQUIV="X-UA-COMPATIBLE" CONTENT="IE=EmulateIE7">

Standards Information

This property is defined in HTML 3.2 World Wide Web link and is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 World Wide Web link.

Applies To

META, HTMLMetaElement Constructor

See Also

content
Community Content

HTML tags should be lower-cased
Added by:Berggreen

It's not good to show examples with uppercase HTML tags.

The above mentioned META tags should be written as:

<meta http-equiv="........" content=".........." />

Secondly, to be a "nice tag" it should also be closed at the end with an / ... otherwise there should be a </meta> afterwards.

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View