Re: HTTP headers

From: David J N Begley <>
Date: Mon, 4 May 1998 20:28:20 +1000 (EST)

On Mon, 4 May 1998, Vladimir Litovka wrote:

> On Mon, 4 May 1998, Ernst Heiri wrote:
> > META tags in the HTML part of a HTTP object are not setting any
> > HTTP-Headers - they are interpreted by browsers (netscape at least) only.
> You are partially true. <META name=...> interpreted by client, but
> <META http-equiv=...> must be interpreted by server. There are http headers
> in http-equiv directive, which server will send with this document.

This depends on the Web server you're using (and its configuration).

If you place "<META HTTP-EQUIV=...>" in the HTML part of a HTTP object,
then those lines will be IGNORED by anything that only processes HTTP
headers (eg., proxy servers like Squid).

If (and ONLY if) your Web server extracts those lines from the object and
creates HTTP headers to suit BEFORE sending the HTTP headers and the
object itself, THEN applications (like Squid) will see the headers and act
on them accordingly.

The point being made is that many Web servers DO NOT extract those lines
automatically and create the necessary HTTP headers; some do, some can be
configured to do so, some require that the headers be otherwise identified
or stored in order to have any affect - others, however, do not.

A perfect case in point is our Apache (1.2.6+mod_expires) server; we
default expiry of objects to one week following the access/download of the
object. The expiry is done by the server sending "Expires:" headers
before sending the actual object.

Some of the people populating data on our server decided to start adding:

  <META HTTP-EQUIV="Expires" ...>

lines in their HTML code. What happened? Apache remained blissfully
ignorant, continuing to return its own "Expires:" headers set for one date
even though the intended "Expires" header in the document (as part of the
META header) set a completely different date.

As those objects pass through Squid, it only sees the "Expires:" header
generated by Apache and so acts on that date (since Squid does not process
the contents of the HTTP object). When the object finally arrives in the
Web browser (eg., Netscape), it's the *browser* that sees the "META" tag
and adjusts its understanding of the expiry date accordingly.

Once told, the developers started using the Apache configuration keywords
(instead of META tags) in order to create the desired effect.

Moral of the story? Just because someone adds "META HTTP-EQUIV" to their
HTML *doesn't* mean that the Web server will always process this and set
the HTTP headers appropriately (thus, proxies won't see the desired


Received on Mon May 04 1998 - 03:46:24 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:40:04 MST