You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sl...@apache.org on 2004/08/11 19:02:35 UTC
cvs commit: httpd-2.0/docs/manual/mod mod_expires.html.en mod_expires.xml
slive 2004/08/11 10:02:35
Modified: docs/manual/mod Tag: APACHE_2_0_BRANCH mod_expires.html.en
mod_expires.xml
Log:
Backport:
Note that mod_expires also sends Cache-Control: max-age.
Revision Changes Path
No revision
No revision
1.12.2.5 +45 -32 httpd-2.0/docs/manual/mod/mod_expires.html.en
Index: mod_expires.html.en
===================================================================
RCS file: /home/cvs/httpd-2.0/docs/manual/mod/mod_expires.html.en,v
retrieving revision 1.12.2.4
retrieving revision 1.12.2.5
diff -u -d -u -r1.12.2.4 -r1.12.2.5
--- mod_expires.html.en 7 May 2004 08:21:03 -0000 1.12.2.4
+++ mod_expires.html.en 11 Aug 2004 17:02:35 -0000 1.12.2.5
@@ -24,24 +24,32 @@
<p><span>Available Languages: </span><a href="../en/mod/mod_expires.html" title="English"> en </a> |
<a href="../ko/mod/mod_expires.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
</div>
-<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Generation of <code>Expires</code> HTTP headers according to
-user-specified criteria</td></tr>
+<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Generation of <code>Expires</code> and
+<code>Cache-Control</code> HTTP headers according to user-specified
+criteria</td></tr>
<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
<tr><th><a href="module-dict.html#ModuleIdentifier">Module�Identifier:</a></th><td>expires_module</td></tr>
<tr><th><a href="module-dict.html#SourceFile">Source�File:</a></th><td>mod_expires.c</td></tr></table>
<h3>Summary</h3>
<p>This module controls the setting of the <code>Expires</code>
- HTTP header in server responses. The expiration date can set to
- be relative to either the time the source file was last
- modified, or to the time of the client access.</p>
+ HTTP header and the <code>max-age</code> directive of the
+ <code>Cache-Control</code> HTTP header in server responses. The
+ expiration date can set to be relative to either the time the
+ source file was last modified, or to the time of the client
+ access.</p>
+
+ <p>These HTTP headers are an instruction to the client about the
+ document's validity and persistence. If cached, the document may
+ be fetched from the cache rather than from the source until this
+ time has passed. After that, the cache copy is considered
+ "expired" and invalid, and a new copy must be obtained from the
+ source.</p>
+
+ <p>To modify <code>Cache-Control</code> directives other than
+ <code>max-age</code> (see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">RFC
+ 2616 section 14.9</a>), you can use the <code class="directive"><a href="../mod/mod_headers.html#header">Header</a></code> directive.</p>
- <p>The <code>Expires</code> HTTP header is an instruction to
- the client about the document's validity and persistence. If
- cached, the document may be fetched from the cache rather than
- from the source until this time has passed. After that, the
- cache copy is considered "expired" and invalid, and a new copy
- must be obtained from the source.</p>
</div>
<div id="quickview"><h3 class="directives">Directives</h3>
<ul id="toc">
@@ -129,23 +137,25 @@
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_expires</td></tr>
</table>
<p>This directive enables or disables the generation of the
- <code>Expires</code> header for the document realm in question.
- (That is, if found in an <code>.htaccess</code> file, for
- instance, it applies only to documents generated from that
- directory.) If set to <code>Off</code>, no <code>Expires</code> header
- will be generated for any document in the realm (unless overridden at
- a lower level, such as an <code>.htaccess</code> file overriding a
- server config file). If set to <code>On</code>, the header will be
- added to served documents according to the criteria defined by the
- <code class="directive"><a href="#expiresbytype">ExpiresByType</a></code> and
- <code class="directive"><a href="#expiresdefault">ExpiresDefault</a></code> directives
- (<em>q.v.</em>).</p>
+ <code>Expires</code> and <code>Cache-Control</code> headers for
+ the document realm in question. (That is, if found in an
+ <code>.htaccess</code> file, for instance, it applies only to
+ documents generated from that directory.) If set to
+ <code>Off</code>, the headers will not be generated for any
+ document in the realm (unless overridden at a lower level, such as
+ an <code>.htaccess</code> file overriding a server config
+ file). If set to <code>On</code>, the headers will be added to
+ served documents according to the criteria defined by the
+ <code class="directive"><a href="#expiresbytype">ExpiresByType</a></code> and
+ <code class="directive"><a href="#expiresdefault">ExpiresDefault</a></code>
+ directives (<em>q.v.</em>).</p>
<p>Note that this directive does not guarantee that an
- <code>Expires</code> header will be generated. If the criteria
- aren't met, no header will be sent, and the effect will be as
- though this directive wasn't even specified.</p>
-
+ <code>Expires</code> or <code>Cache-Control</code> header will be
+ generated. If the criteria aren't met, no header will be sent, and
+ the effect will be as though this directive wasn't even
+ specified.</p>
+
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ExpiresByType" id="ExpiresByType">ExpiresByType</a> <a name="expiresbytype" id="expiresbytype">Directive</a></h2>
@@ -160,10 +170,13 @@
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_expires</td></tr>
</table>
<p>This directive defines the value of the <code>Expires</code>
- header generated for documents of the specified type (<em>e.g.</em>,
- <code>text/html</code>). The second argument sets the number of
- seconds that will be added to a base time to construct the expiration
- date.</p>
+ header and the <code>max-age</code> directive of the
+ <code>Cache-Control</code> header generated for documents of the
+ specified type (<em>e.g.</em>, <code>text/html</code>). The second
+ argument sets the number of seconds that will be added to a base
+ time to construct the expiration date. The <code>Cache-Control:
+ max-age</code> is calculated by subtracting the request time from
+ the expiration date and expressing the result in seconds.</p>
<p>The base time is either the last modification time of the
file, or the time of the client's access to the document. Which
@@ -229,4 +242,4 @@
</div><div id="footer">
<p class="apache">Copyright 1999-2004 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
-</body></html>
\ No newline at end of file
+</body></html>
1.3.2.5 +47 -32 httpd-2.0/docs/manual/mod/mod_expires.xml
Index: mod_expires.xml
===================================================================
RCS file: /home/cvs/httpd-2.0/docs/manual/mod/mod_expires.xml,v
retrieving revision 1.3.2.4
retrieving revision 1.3.2.5
diff -u -d -u -r1.3.2.4 -r1.3.2.5
--- mod_expires.xml 17 Apr 2004 18:43:37 -0000 1.3.2.4
+++ mod_expires.xml 11 Aug 2004 17:02:35 -0000 1.3.2.5
@@ -22,24 +22,34 @@
<modulesynopsis metafile="mod_expires.xml.meta">
<name>mod_expires</name>
-<description>Generation of <code>Expires</code> HTTP headers according to
-user-specified criteria</description>
+<description>Generation of <code>Expires</code> and
+<code>Cache-Control</code> HTTP headers according to user-specified
+criteria</description>
<status>Extension</status>
<sourcefile>mod_expires.c</sourcefile>
<identifier>expires_module</identifier>
<summary>
<p>This module controls the setting of the <code>Expires</code>
- HTTP header in server responses. The expiration date can set to
- be relative to either the time the source file was last
- modified, or to the time of the client access.</p>
+ HTTP header and the <code>max-age</code> directive of the
+ <code>Cache-Control</code> HTTP header in server responses. The
+ expiration date can set to be relative to either the time the
+ source file was last modified, or to the time of the client
+ access.</p>
+
+ <p>These HTTP headers are an instruction to the client about the
+ document's validity and persistence. If cached, the document may
+ be fetched from the cache rather than from the source until this
+ time has passed. After that, the cache copy is considered
+ "expired" and invalid, and a new copy must be obtained from the
+ source.</p>
+
+ <p>To modify <code>Cache-Control</code> directives other than
+ <code>max-age</code> (see <a
+ href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">RFC
+ 2616 section 14.9</a>), you can use the <directive
+ module="mod_headers">Header</directive> directive.</p>
- <p>The <code>Expires</code> HTTP header is an instruction to
- the client about the document's validity and persistence. If
- cached, the document may be fetched from the cache rather than
- from the source until this time has passed. After that, the
- cache copy is considered "expired" and invalid, and a new copy
- must be obtained from the source.</p>
</summary>
<section id="AltSyn"><title>Alternate Interval Syntax</title>
@@ -117,23 +127,25 @@
<usage>
<p>This directive enables or disables the generation of the
- <code>Expires</code> header for the document realm in question.
- (That is, if found in an <code>.htaccess</code> file, for
- instance, it applies only to documents generated from that
- directory.) If set to <code>Off</code>, no <code>Expires</code> header
- will be generated for any document in the realm (unless overridden at
- a lower level, such as an <code>.htaccess</code> file overriding a
- server config file). If set to <code>On</code>, the header will be
- added to served documents according to the criteria defined by the
- <directive module="mod_expires">ExpiresByType</directive> and
- <directive module="mod_expires">ExpiresDefault</directive> directives
- (<em>q.v.</em>).</p>
+ <code>Expires</code> and <code>Cache-Control</code> headers for
+ the document realm in question. (That is, if found in an
+ <code>.htaccess</code> file, for instance, it applies only to
+ documents generated from that directory.) If set to
+ <code>Off</code>, the headers will not be generated for any
+ document in the realm (unless overridden at a lower level, such as
+ an <code>.htaccess</code> file overriding a server config
+ file). If set to <code>On</code>, the headers will be added to
+ served documents according to the criteria defined by the
+ <directive module="mod_expires">ExpiresByType</directive> and
+ <directive module="mod_expires">ExpiresDefault</directive>
+ directives (<em>q.v.</em>).</p>
<p>Note that this directive does not guarantee that an
- <code>Expires</code> header will be generated. If the criteria
- aren't met, no header will be sent, and the effect will be as
- though this directive wasn't even specified.</p>
-</usage>
+ <code>Expires</code> or <code>Cache-Control</code> header will be
+ generated. If the criteria aren't met, no header will be sent, and
+ the effect will be as though this directive wasn't even
+ specified.</p>
+ </usage>
</directivesynopsis>
<directivesynopsis>
@@ -148,10 +160,13 @@
<usage>
<p>This directive defines the value of the <code>Expires</code>
- header generated for documents of the specified type (<em>e.g.</em>,
- <code>text/html</code>). The second argument sets the number of
- seconds that will be added to a base time to construct the expiration
- date.</p>
+ header and the <code>max-age</code> directive of the
+ <code>Cache-Control</code> header generated for documents of the
+ specified type (<em>e.g.</em>, <code>text/html</code>). The second
+ argument sets the number of seconds that will be added to a base
+ time to construct the expiration date. The <code>Cache-Control:
+ max-age</code> is calculated by subtracting the request time from
+ the expiration date and expressing the result in seconds.</p>
<p>The base time is either the last modification time of the
file, or the time of the client's access to the document. Which