[Zope-dev] Last-modified and bobobase_modification_time
Toby Dickenson
tdickenson@geminidataloggers.com
Wed, 19 Jun 2002 10:06:10 +0100
On Wednesday 19 Jun 2002 4:27 am, Wei He wrote:
> On Tue, 18 Jun 2002, Dieter Maurer wrote:
> > Wei He writes:
> > > ...
> > > 2. From the website developers' point of view, there are already m=
any
> > > guidlines on how to create a good webpage. Among them are using th=
e
> > > HTTP Last-modification header to take the advantages of client cac=
he.
> >
> > I think you overestimate the importance of accurate "Last-Modified"
> > headers.
The only thing Last-Modified can give you over Expires and Cache-Control =
is=20
the possibility of sending a 304 Not Modified response code instead of a =
200.
If the response is cheap to calculate and transmit then a 200 may not be =
much=20
more expensive than a 304, and you are correct that maintaining an accura=
te=20
last-modified may not be cost-effective.
However, if the response is expensive to transfer (that is, large) or=20
expensive to calculate, then a 304 may be a significant saving.
> Perhaps. But I think Etag, If-Modified-Since or whatever headers only
> make sense to a cache server that is designed to use these values, not
> for a generic one or the end users browser clients.
No, these headers are specified in RFC2616 and are commonly used by brows=
ers,=20
caches, and accelerators.
> If I understand correctly, the Expires header can only give the
> client an impression how ofter a page is updated.
No, it is the opposite of that. It says how long you can assume it will n=
ot=20
change.
> > I would use "Expires" and "Cache-Control" for cache control.
>
> Only when you want to disable the cache function, can these two headers=
be
> useful.
I suggest you read RFC2616.