19.16 mod_expires

Team-Fly    

 
Webmaster in a Nutshell, 3rd Edition
By Robert Eckstein, Stephen Spainhour
Table of Contents
Chapter 19.  Apache Modules

19.16 mod_expires

The mod_expires module allows for the generation of HTTP Expires headers for server content. This prevents a document retrieved from the server from being cached and reused on the client machine for any duration past the stated expiration date.

ExpiresActive

  ExpiresActive  truefalse 

[ server config , or within <VirtualHost> or <Directory>, or .htaccess ]

Activates an expiration header for the documents in this realm. The default is false.

ExpiresByType

  ExpiresByType   mime-type  <AM>  seconds  

[ server config , or within <VirtualHost> or <Directory>, or .htaccess ]

Specifies the mime-type of a document and the number of seconds the document should expire in. For example:

 ExpiresByType text/html A300000 ExpiresByType image/jpg M300000 

The seconds field should be preceded by either the letter A or M. An A indicates that the resource should expire the specified number of seconds after the client's access. An M indicates that the resource should expire the specified number of seconds after the last modification date of the document as it resides on the server. The default is specified by the ExpiresDefault directive below; this directive overrides the default.

ExpiresDefault

  ExpiresDefault  <AM>  seconds  

[ server config , or within <VirtualHost> or <Directory>, or .htaccess ]

Specifies the default type of expiry and the number of seconds that document in a specified realm should be cached before it expires. See ExpiresByType above.


Team-Fly    
Top


Webmaster in a Nutshell
Webmaster in a Nutshell, Third Edition
ISBN: 0596003579
EAN: 2147483647
Year: 2002
Pages: 412

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net