Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

META for Creating HTTP Headers

If you use <META HTTP-EQUIV="..."> instead of <META NAME="...">, you are indicating that the web browser should pretend that the name/value pair in the tag was sent as an HTTP header. First let's explain what HTTP headers are. HTTP headers are information that is sent with every document on the web, but is not displayed in the document itself. The headers, which are sent before the HTML for the page, are metainformation, ie information about the document. For example, when you retrieve the page at https://www.idocs.com/tags/, headers like this are sent first:
HTTP/1.1 200 OK
Date: Wed, 13 Aug 1997 02:35:50 GMT
Server: Apache/1.2.0
Last-Modified: Fri, 04 Jul 1997 22:18:24 GMT
ETag: "28f7d-810-33bd76b0"
Content-Length: 2064
Accept-Ranges: bytes
Connection: close
Content-Type: text/html
<META HTTP-EQUIV="..."> is intended to allow you to add to those headers. For example, to add the name of the author, you might use this <META ...> tag:

<META HTTP-EQUIV="Author" CONTENT="John Doe">

When the browser gets the document, it pretends that there is a header which looks like this:

Author: John Doe

It should be emphasized that web browsers will generally make use of HTTP-EQUIV as if it were an HTTP header, but the information is not really made into a header. When <META HTTP-EQUIV="..."> was first created it was intended that web servers would read the <META HTTP-EQUIV="..."> tags and actually add them to the HTTP headers, but server makers found that it takes too much extra computing overhead to have the server read through the web page, pull out the <META HTTP-EQUIV="..."> tags, and add the name/value pairs to the headers. Very few web servers will actually add the headers. One of the few web serving programs that does do this is called WN, and that program only recognizes HTTP-EQUIV (when the document should be considered out-of-date), and HTTP-EQUIV. If you need for the information to actually be added to the headers, check with your web server administrator.

 
 
  Copyright 1997-2002 Idocs inc. Published under the terms of the Open Content License Design by Interspire