summaryrefslogtreecommitdiffstats
path: root/docs/manual/content-negotiation.html
diff options
context:
space:
mode:
authorRich Bowen <rbowen@apache.org>2001-09-03 05:45:27 +0200
committerRich Bowen <rbowen@apache.org>2001-09-03 05:45:27 +0200
commitd3c7404f6b0da8836a8bb3ef0a802538d91ee9b4 (patch)
treea839f98b6e8f6182280d0a355896bf1c007fb068 /docs/manual/content-negotiation.html
parentMake Apache 2.0 install all files in the same location as Apache 1.3 (diff)
downloadapache2-d3c7404f6b0da8836a8bb3ef0a802538d91ee9b4.tar.xz
apache2-d3c7404f6b0da8836a8bb3ef0a802538d91ee9b4.zip
Added a little more detail to the docs based on some comments from Bill
Rowe. More to come, but this clarified a point that I had to track down earlier, and may save someone some time. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90878 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/content-negotiation.html')
-rw-r--r--docs/manual/content-negotiation.html22
1 files changed, 16 insertions, 6 deletions
diff --git a/docs/manual/content-negotiation.html b/docs/manual/content-negotiation.html
index d1b4ab20ab..a813fcf8c9 100644
--- a/docs/manual/content-negotiation.html
+++ b/docs/manual/content-negotiation.html
@@ -114,16 +114,17 @@ file suffix as <CODE>type-map</CODE>; this is best done with a
AddHandler type-map .var
</PRE>
-in the server configuration file. See the comments in the sample config
-file for more details. <P>
+in the server configuration file.<p>
-Type map files have an entry for each available variant; these entries
+Type map files should have the same name as the resource which they are
+describing, and have an entry for each available variant; these entries
consist of contiguous HTTP-format header lines. Entries for
different variants are separated by blank lines. Blank lines are
illegal within an entry. It is conventional to begin a map file with
an entry for the combined entity as a whole (although this
is not required, and if present will be ignored). An example
-map file is:
+map file is shown below. This file would be named <code>foo.html</code>,
+as it describes a resource named <code>foo</code>.
<PRE>
URI: foo
@@ -137,6 +138,9 @@ map file is:
Content-language: fr, de
</PRE>
+Note also that a typemap file will take precedence over the filename's
+extension, even when Multiviews is on.
+
If the variants have different source qualities, that may be indicated
by the "qs" parameter to the media type, as in this picture (available
as jpeg, gif, or ASCII-art):
@@ -196,7 +200,7 @@ The full list of headers recognized is:
for compress'd files, and <CODE>x-gzip</CODE> for gzip'd files.
The <CODE>x-</CODE> prefix is ignored for encoding comparisons.
<DT> <CODE>Content-Length:</CODE>
- <DD> The size of the file. Specifying content
+ <DD> The size of the file in bytes. Specifying content
lengths in the type-map allows the server to compare file sizes
without checking the actual files.
<DT> <CODE>Description:</CODE>
@@ -206,6 +210,11 @@ The full list of headers recognized is:
list will include the human-readable variant descriptions.
</DL>
+Using a type map file is preferred over <code>MultiViews</code> because
+it requires less CPU time, and less file access, to parse a file
+explicitly listing the various resource variants, than to have to look
+at every matching file, and parse its file extensions.
+
<H3>Multiviews</H3>
<P>
@@ -485,7 +494,8 @@ quality factors to 5 decimal places before choosing the best variant.
If you are using language negotiation you can choose between
different naming conventions, because files can have more than one
extension, and the order of the extensions is normally irrelevant
-(see <A HREF="mod/mod_mime.html">mod_mime</A> documentation for details).
+(see the <A HREF="mod/mod_mime.html#multipleext">mod_mime</A>
+documentation for details).
<P>
A typical file has a MIME-type extension (<EM>e.g.</EM>, <SAMP>html</SAMP>),
maybe an encoding extension (<EM>e.g.</EM>, <SAMP>gz</SAMP>), and of course a