Meta Object
The httpEquiv property sets or returns an HTTP header for the information in the content attribute.
The http-equiv attribute can be used to simulate an HTTP response header.
The value of the http-equiv attribute depends on the value of the content attribute.
Note: If the name attribute is set, the http-equiv attribute should not be set.
Set the httpEquiv property:
Return the httpEquiv property:
Some commonly used HTTP-header values are:
| Value | Description |
|---|---|
| cache-control | Controls the caching mechanism to use for the document.
Available values:
Example: <meta http-equiv="cache-control" content="no-cache" /> |
| content-language | Specifies the natural language(s) of the document (used
by search engines to categorize pages by language).
Example: <meta http-equiv="content-language" content="en-US" /> |
| content-type | Specifies the character set for the contents of the document. Tip: It is recommended to always specify the character set. Example: <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> |
| date | Specifies the date and time when the page was created.
Example: <meta http-equiv="date" content="Wed, 16 Feb 2011 22:34:13 GMT" /> |
| expires | Specifies the date and time when the page will expire.
Example: <meta http-equiv="expires" content="Fri, 30 Dec 2011 12:00:00 GMT" /> |
| last-modified | Specifies the last modification date.
Example: <meta http-equiv="last-modified" content="Mon, 03 Jan 2011 17:45:57 GMT" /> |
| location | Redirects the visitor to another location.
Example: <meta http-equiv="location" content="URL=http://www.w3schools.com" /> |
| refresh | Defines a time interval for the document to refresh itself.
Example: <meta http-equiv="refresh" content="300" /> |
| set-cookie | Creates a cookie with specified name,expires date and value.
Example: <meta http-equiv="set-cookie" content="w3scookie=myContent;expires=Fri, 30 Dec 2011 12:00:00 GMT; path=http://www.w3schools.com"> |
| window-target | Specifies the name of the frame where the current document must be loaded |
![]()
The httpEquiv property is supported in all major browsers.
Display the HTTP header for the information in the content attribute:
Meta Object
The perfect solution for professionals who need to balance work, family, and career building.
More than 10 000 certificates already issued!
The HTML Certificate documents your knowledge of HTML.
The CSS Certificate documents your knowledge of advanced CSS.
The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.
The jQuery Certificate documents your knowledge of jQuery.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
| WEB HOSTING |
|---|
| Best Web Hosting |
| PHP MySQL Hosting |
| Best Hosting Coupons |
| UK Reseller Hosting |
| Cloud Hosting |
| Top Web Hosting |
| $7.95/mo SEO Hosting |
| Premium Website Design |
| WEB BUILDING |
|---|
| Download XML Editor |
| FREE Website BUILDER |
| Free Website Templates Free CSS Templates |
| Make Your Own Website |
| W3SCHOOLS EXAMS |
|---|
|
Get Certified in: HTML, CSS, JavaScript, XML, PHP, and ASP |
| W3SCHOOLS BOOKS |
|---|
|
New Books: HTML, CSS JavaScript, and Ajax |
| STATISTICS |
|---|
|
Browser Statistics Browser OS Browser Display |
| SHARE THIS PAGE |
|---|