Meta httpEquiv Property
Meta Object
Definition and Usage
The httpEquiv property sets or returns the HTTP header information in the content property.
The http-equiv property can be used to simulate HTTP response header information.
The http-equiv property value depends on the value of the content property.
**Note:** If the name property is already set, the http-equiv property does not need to be set.
Syntax
Set the httpEquiv property:
linkObject.httpEquiv="
HTTP-header
"
Return the httpEquiv property:
linkObject.httpEquiv
Some commonly used HTTP-header values:
| Value | Description |
|---|---|
| cache-control | Controls the caching mechanism of the document.
Allowed values: |
Example:
| | content-language | the language of the response bodyExample:
| | content-type | the MIME type of the returned contentTip: Usually used for character set settings.
Example:
| | date | the time the origin server sent the messageExample:
| | expires | the date and time when the response expiresExample:
| | last-modified | the last modification time of the requested resourceExample:
| | location | used to redirect the recipient to a non-requested URL location to complete the request or identify a new resourceExample:
| | refresh | defines how long to wait before refreshing the page.Example:
| | set-cookie | creates a cookie containing the cookie name, cookie value, and expiration time.Example:
| | window-target | specifies the name of the frame to load |Browser support





All major browsers support the httpEquiv property
Example
Example
Display HTTP header information:
Try it »
Meta Object