]> granicus.if.org Git - apache/commitdiff
Note that mod_expires also sends Cache-Control: max-age.
authorJoshua Slive <slive@apache.org>
Wed, 11 Aug 2004 16:59:41 +0000 (16:59 +0000)
committerJoshua Slive <slive@apache.org>
Wed, 11 Aug 2004 16:59:41 +0000 (16:59 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104550 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/index.html.en
docs/manual/mod/mod_expires.html.en
docs/manual/mod/mod_expires.xml

index 3df53a8653879855950b4ddaa90f44427d12e576..a265b114a953083d60bc000e1a194e15802a7249 100644 (file)
@@ -114,8 +114,9 @@ modules</dd>
 <dt><a href="mod_env.html">mod_env</a></dt><dd>Modifies the environment which is passed to CGI scripts and
 SSI pages</dd>
 <dt><a href="mod_example.html">mod_example</a></dt><dd>Illustrates the Apache module API</dd>
-<dt><a href="mod_expires.html">mod_expires</a></dt><dd>Generation of <code>Expires</code> HTTP headers according to
-user-specified criteria</dd>
+<dt><a href="mod_expires.html">mod_expires</a></dt><dd>Generation of <code>Expires</code> and
+<code>Cache-Control</code> HTTP headers according to user-specified
+criteria</dd>
 <dt><a href="mod_ext_filter.html">mod_ext_filter</a></dt><dd>Pass the response body through an external program before
 delivery to the client</dd>
 <dt><a href="mod_file_cache.html" id="F" name="F">mod_file_cache</a></dt><dd>Caches a static list of files in memory</dd>
index ebe6b0486386c8ac27312306e9744af94ce1d3b6..571d9d64caa34d3869b9ad2dae3e96518c05fbec 100644 (file)
 <a href="../ja/mod/mod_expires.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
 <a href="../ko/mod/mod_expires.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</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>
-
-    <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>
+    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>
+
 </div>
 <div id="quickview"><h3 class="directives">Directives</h3>
 <ul id="toc">
@@ -130,23 +138,25 @@ headers</td></tr>
 <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>
@@ -161,10 +171,13 @@ by MIME type</td></tr>
 <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
index 2ae7f5b45d9802816734b8d38149ac68ee7c16ba..766983d6494e74e61676c1cf2091dee86a57a14a 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
-<!-- $Revision: 1.7 $ -->
+<!-- $Revision: 1.8 $ -->
 
 <!--
  Copyright 2002-2004 The Apache Software Foundation
 <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>
-
-    <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>
+    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>
+
 </summary>
 
 <section id="AltSyn"><title>Alternate Interval Syntax</title>
@@ -117,23 +127,25 @@ headers</description>
 
 <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 @@ by MIME type</description>
 
 <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