You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by David Robinson <dr...@ast.cam.ac.uk> on 1996/02/06 18:59:00 UTC

Re: Two new modules (controlling Expires header)

> CONTROLLING EXPIRES HEADERS
>
> I figured it'd be cool to have a general mechanism for controlling
> the nature of the Expires headers issued on a server-wide per-directory
> basis, issuing headers based on the content-type as well as providing
> a default expiry date and being able to switch expiry behaviour on
> or off.  There's more info in the module itself but briefly you
> get 3 new directives to play with:
>
>         ExpiresActive on | off
>         ExpiresDefault <code><seconds>
>         ExpiresByType type/encoding <code><seconds>
> 
> Which lets you put stuff like this in your .htaccess or conf files:
> 
>         # Bizzy development site, if you're gonna cache us
>         # don't do it for long!
>         ExpiresDefault M3600
>         # pages are hot (1 week), images are cold (1 month)
>         ExpiresByType text/html A604800
>         ExpiresByType image/gif A2592000
> 
> here, the 'M3600' means, by default, to expire documents 3600
> seconds (one hour) after their last 'M'odified date.  Similarly
> all your gifs will  get expired 2592000 seconds (er, one week)
> after they're 'A'ccessed from the server.
> 
> I'm not sure (after beating by brains out trying to figure out how)
> that there needs to be a distinction between M and A here, but
> that's for users to decide.  The module is uploaded as:
> 
>         httpd/incoming/mod_expires.c_1.0.0

I don't think you want the A or M stuff.
Either:
You really know the expiration date for a document, in which case you'd want
Expires myfile "13 Jun 1996 12:46"
_or_ you wish to set a 'lifetime' for a document, so you'd want
Expires myfile  "10 days"
which would expire it 10 days after it was last modified.

There is absolutely no good reason to change the expiry date on an file
simply because it was accessed.

 David.

Re: Two new modules (controlling Expires header)

Posted by Brian Behlendorf <br...@organic.com>.
On Tue, 6 Feb 1996, David Robinson wrote:
> There is absolutely no good reason to change the expiry date on an file
> simply because it was accessed.

Why not?  That's how DNS works, pretty effectively too.  Let's face it - 
for most documents out there there *is* no date at which the document 
"goes bad", in the same way that milk goes bad.  At least in the opinions 
of the authors, which is all that matters here. 

	Brian

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com  brian@hyperreal.com  http://www.[hyperreal,organic].com/