This needs a little clarification.

--- Stephan Tinnemeyer <[EMAIL PROTECTED]> wrote:
> Rodney Myers wrote:
> > 
> > Is that better than or just equivalent to :
> > 
> > print <<EOP;
> > Content-type: text/html
> > Pragma: no-cache
> > <html>
> > ....
> > 
> At least it is not worse. I KNOW that it works, I do not know that your
> approach works:
> 
> -     After "Content-type: text/html" 2 new lines have to follow. 

That's not correct.  The various types of headers and the Entity-body (usually just 
referred to as
"the body") are separated by a blank line.  Usually, the user agent (browser, in this 
case) does
not care about the order of the headers.


> -     I don't know whether the line "Pragma: no-cache" will be understood by
>       proxy servers but I know that the the meta tag
> 
>               <meta http-equiv="pragma" content="no-cache">

Those are actually the same thing.  Any meta tag with an 'http-equiv' is actually 
interpreted by
the agent as being a header.  This is to allow Web designers and programmers with 
little control
over the headers to add their own or override server supplied headers (though, IIRC, 
you cannot
override the server-supplied Date.)

Incidentally, since HTML documents are parsed top to bottom, I read at least one 
article (can't
find the source) that recommended putting a *separate* head section after the closing 
body tag and
adding another no-cache tag to ensure that the HTML document is truly removed from the 
cache. 
Personally, I'm suspicious of that one.

A brief overview of meta-tag usage can be found at
http://www.webdeveloper.com/html/html_metatags.html (it's a bit out of date, though).

Properly configured proxy servers can be told not to cache the Web page with the 
following
response header: "Cache-control: no-cache" header.  The meta tag equivalent is:

    <meta http-equiv="cache-control" content="no-cache">

The "Pragma: no-cache" header is actually an HTTP 1.0 feature and is maintained in 
HTTP 1.1 only
for purposes of backwards compatibility.

The expires header is an entity header that tells the user agent when the information 
in the body
will change or become invalid.  Properly, the date should follow RFC850 format:

    <META HTTP-EQUIV="expires" CONTENT="Tue, 27 Nov 2001 13:21:57 GMT"> 

In reality, however, many people often use an illegal "0" (zero) for the date.  
Browsers interpret
this as meaning that the document expires immediately.

If anyone has any corrections or addendums to the above, I'd love to hear 'em.

Cheers,
Curtis "Ovid" Poe

=====
Senior Programmer
Onsite! Technology (http://www.onsitetech.com/)
"Ovid" on http://www.perlmonks.org/

__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to