Re: Last-Modified vs. Expires

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sat, 26 Jul 1997 12:29:25 +0200

--MimeMultipartBoundary
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Agreed. Last-Modified has some large advantages over Expires:

1. No additional work is needed by the webmaster.
2. It is self-adjusting giving a short refresh rate on pages that do get
modified often, and a long on objects that are not.
3. Since it is not fixed it gives a lot of configuration flexibility by
the cache managers who want to improve their cache ratio.

Fixed expires is probably only feasible when the content provider knows
when the object is going to be updated next time, and bothers to
maintain the expires dates.

But what about if the web server uses the same kind of logistics that
today are built into cache servers, namely to calculate expiry date
based on last modification date and content-type? (with resonable
defaults built in)

I am not sure that one is better than the other. Expires gives the
control to the content-provided, which usually doesn't bother to care.
Last-Modified gives the control to the cache-managers that care but have
no control on the content updates...

So my wote is after all Last-Modified, unless the content-provider knows
exacly what he does. Expires is a much stricter expiry model than
Last-Modified, and if a expiry date is set by the content provider it
should be assumed to be correct and the object is cached without
restrictions until this date.

Why use Last-Modified and not Expires as a general approach:
* Gives the control to people who care about having a good cache
consistency and cache rate.
* Expires: should only be used when the update frequency is known. If a
object has a exiry date it should be possible to trust this.
* Easier to implement, and requires no configuration or maintaince by
the content-provider (thereby lessening the risk of misconfigured
servers)

Yes, using server generated Expiry dates at first seems to make the
cache life easier, but I am afraid that it is more likely to make cache
maintainse much worse:

* Many content provider has no clue what caching is or how it works.
* Many people likes to experiment with things they have no clue of.
* If content providers are given a easy way to say that all their
content expires in 2 minutes they will happily do so to get their
statistics correct or to force updates to be shown quickly.

Best regards
Henrik Nordstr=F6m
Inter/Intranet consultant
Former Squid Hacker

ps. This is my thoughts as I write them. I have not tried to clean this
up and you are assumed to read the whole letter before giving any
comments, but all comments are welcome (even if it only is a misspelled
word ;-) )

Ernst Heiri wrote:

> Technically I agree that Expires is the better mechanisme than Last-Mod=
ified
> but if we expect that a majority of webserver will not be configured
> to set a reasonable Expires it's much better to use Last-Modifed for
> SSI-documents which are not dynamic.
> =

> Ernst

--MimeMultipartBoundary--
Received on Tue Jul 29 2003 - 13:15:42 MDT

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