[thelist] good practice META tags?

deke web at master.gen.in.us
Fri May 25 09:05:14 CDT 2001


On 24 May 2001, at 16:48, Keith Davis posted a message which said:

> > Can you name *any* circumstance in which the illegal "pragma"
> > header works and these headers don't?
> > <META HTTP-EQUIV="Expires" CONTENT="Thu, 01 Dec 1994 16:00:00 GMT">
> > <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
 
> Yeah. I can't see how you would use a meta tag to tell the browser to
> keep a certain image, or an external javascript, or an embedded cgi
> response out of the cache while caching the rest of the page. But,
> sending the Pragma: no-cache header along with those page components
> will do the trick. 

Tell me how you use ANY meta tag to prevent the caching
of only one component of the page! 

Use of REAL headers is much better for *any* caching directives. 
A big portion of the internet resides behind the AOL caching 
firewall, and it does NOT read HTML, so HTTP-EQUIV meta tags 
do not affect it. I presume without any evidence that other caching 
firewalls *may* exhibit similar behavior.

If you are REAL headers, you can use Expires:, which originated 
with HTTP/0.9 and the Cache-Control: header of HTTP/1.1, instead 
of the Pragma header, which has *never* been legal in that context.

There is a problem with the Expires: header in that *some* snippy
implementations demand that you follow the specification. How
odd, that software should treat garbage data as garbage data!  
Saying content=0 or content=-1 ain't legal. Neither is saying
"Fri, 01 Dec 1994 16:00:00 GMT" when that date was a Thursday.

> You can run across Pragma: no-cache occasionally in CPAN modules and
> from what I've read it has been used by Perl programmers for years as
> the preferred method of keeping content and/or full pages out of the
> cache. (Maybe that's because we're always looking for the least verbose
> way to do something.)

It *is* supposed to keep content and/or full pages out of the SERVER
cache.

> The way I understand it, the browser starts to read a page from cache,
> discovers it has expired, requests (via pragma?) the lastModifiedDate
> and/or fileSize from the server, and then may continue to display the
> page from its cache if no change has been made in the interval. 

To get the LastModifiedDate, you do a HEAD request of the server.

> Delivering dynamic components to realestate on static web pages is
> becoming a very large industry. Managing what gets cached in the mix is
> a problem in this area that has many solutions, each with many
> proponents. Can you offer a URL that points to the standard you quote??

http://www.ietf.org/rfc/rfc1945.txt covers the HTTP/1.0 standard and
http://www.ietf.org/rfc/rfc2616.txt covers the HTTP/1.1 standard

> Or better, what kind of data is exchanged in a pragma request/response?

The Pragma general-header field is used to include implementation-
specific directives that may apply to any recipient along the
request/response chain. All pragma directives specify optional
behavior from the viewpoint of the protocol; however, some systems
may require that behavior be consistent with the directives.

    Pragma           = "Pragma" ":" 1#pragma-directive
    pragma-directive = "no-cache" | extension-pragma
    extension-pragma = token [ "=" word ]

When the "no-cache" directive is present in a request message, an
application should forward the request toward the origin server even
if it has a cached copy of what is being requested. This allows a
client to insist upon receiving an authoritative response to its
request. It also allows a client to refresh a cached copy which is
known to be corrupted or stale.

Pragma directives must be passed through by a proxy or gateway
application, regardless of their significance to that application,
since the directives may be applicable to all recipients along the
request/response chain. It is not possible to specify a pragma for a
specific recipient; however, any pragma directive not relevant to a
recipient should be ignored by that recipient.

 

------------------------
 "The church is near but the road is icy; 
  the bar is far away but I will walk carefully." 
                            -- Russian Proverb




More information about the thelist mailing list