You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1217 lines
48 KiB
1217 lines
48 KiB
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
|
<head>
|
|
<title>Common User Agent Problems</title>
|
|
<style type="text/css">
|
|
.checkpoint {
|
|
border: 2px dotted gray;
|
|
/*margin : 1em 12% 1em 12%;*/
|
|
margin : 2em;
|
|
}
|
|
.gl {
|
|
border: 1px solid black;
|
|
background: #FFFFCC;
|
|
color: black;
|
|
padding: .5em;
|
|
}
|
|
|
|
div.cp-head{
|
|
border: 1px solid red;
|
|
margin-bottom: 1em;
|
|
margin-right : auto;
|
|
padding: .2em 1em;
|
|
background: #eee;
|
|
}
|
|
h4.cp-head{
|
|
border: 1px solid red;
|
|
margin-bottom: 1em;
|
|
margin-right : auto;
|
|
margin-top : 0;
|
|
padding: .2em 1em;
|
|
background: #eee;
|
|
}
|
|
p.cp, div.cp{
|
|
margin-left: .5em;
|
|
margin-right: .5em;
|
|
}
|
|
span.cp-target {
|
|
vertical-align: super;
|
|
font-size: smaller;
|
|
}
|
|
span.cp-number {
|
|
|
|
}
|
|
span.cp-title {
|
|
font-weight:bold;
|
|
}
|
|
.example {
|
|
color: maroon;
|
|
margin-left: 2em;
|
|
}
|
|
|
|
span.example-good {
|
|
background : #65A05C;
|
|
color: black;
|
|
}
|
|
|
|
span.example-bad {
|
|
background : #DD5555;
|
|
color: black;
|
|
}
|
|
li.cp-prov {
|
|
list-style-type: upper-roman;
|
|
}
|
|
table.checklist {
|
|
width: 90%;
|
|
}
|
|
td.gl {
|
|
background: #FFFFCC;
|
|
color: black;
|
|
font-size: 1.1em;
|
|
}
|
|
|
|
ins { background-color: #FF3; }
|
|
|
|
dl.checkpoints dt
|
|
{
|
|
padding: 2em 0 0 0;
|
|
}
|
|
|
|
</style>
|
|
<meta name="Keywords" content="QA, quality assurance, conformance, validity, user agent, browser, http, uri, cache, content-negotiation, usability, implementation" />
|
|
<meta name="Description" content="Common mistakes in user agents due to incorrect or incomplete implementation of specifications and suggestions of remedies" />
|
|
<link rel="schema.DC" href="http://purl.org/dc" />
|
|
<meta name="DC.Subject" lang="en" content="QA, quality assurance, conformance, validity, user agent, browser, http, uri, cache, content-negotiation, usability, implementation" />
|
|
<meta name="DC.Title" lang="en" content="Common User Agent Problems" />
|
|
<meta name="DC.Description.Abstract" lang="en" content="Common mistakes in user agents due to incorrect or incomplete implementation of specifications and suggestions of remedies" />
|
|
<meta name="DC.Date.Created" content="2002-11-18" />
|
|
<meta name="DC.Language" scheme="RFC1766" content ="en" />
|
|
<meta name="DC.Creator" content="Karl Dubost" />
|
|
<meta name="DC.Publisher" content="W3C - World Wide Web Consortium - http://www.w3.org" />
|
|
<meta name="DC.Rights" content="http://www.w3.org/Consortium/Legal/copyright-documents-19990405" />
|
|
<link rel="stylesheet" type="text/css"
|
|
href="http://www.w3.org/StyleSheets/TR/W3C-NOTE" />
|
|
</head>
|
|
<body>
|
|
|
|
<div class="head">
|
|
<p>
|
|
<a href="http://www.w3.org/">
|
|
<img
|
|
src="http://www.w3.org/Icons/w3c_home" alt="W3C" height="48"
|
|
width="72" /></a></p>
|
|
|
|
<h1>Common User Agent Problems</h1>
|
|
<p>Once Upon A Time, A User Agent...</p>
|
|
|
|
<h2>W3C Note 28 January 2003</h2>
|
|
|
|
<dl>
|
|
<dt>This version:</dt>
|
|
<dd><a href="http://www.w3.org/TR/2003/NOTE-cuap-20030128">
|
|
http://www.w3.org/TR/2003/NOTE-cuap-20030128</a></dd>
|
|
<dt>Latest version:</dt>
|
|
<dd><a href="http://www.w3.org/TR/cuap">http://www.w3.org/TR/cuap</a></dd>
|
|
<dt>Previous version:</dt>
|
|
<dd><a href="http://www.w3.org/TR/2001/NOTE-cuap-20010206">http://www.w3.org/TR/2001/NOTE-cuap-20010206</a></dd>
|
|
<dt>Translations of this document:</dt>
|
|
<dd><a href="http://www.w3.org/QA/translations#cuap">
|
|
http://www.w3.org/QA/translations#cuap</a></dd>
|
|
<dt>Editor:</dt>
|
|
<dd><a href="http://www.w3.org/People/karl/">Karl Dubost</a>, W3C</dd>
|
|
<dt>Authors and contributors:</dt>
|
|
<dd>See <a href="#acknowledgments">Acknowledgments</a>.</dd>
|
|
</dl>
|
|
|
|
<p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"> Copyright</a> © 2003 <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup> (<a href="http://www.lcs.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.org/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>, <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-software">software licensing</a> rules apply.</p>
|
|
|
|
</div>
|
|
|
|
<hr />
|
|
<h2><a name="abstract" id="abstract">Abstract</a></h2>
|
|
|
|
<p>This document explains some common mistakes in user agents due to incorrect or incomplete implementation of specifications, and suggests remedies. It also suggests some "good behavior" where specifications themselves do not specify any particular behavior (e.g., in the face of error conditions). This document is not a complete set of guidelines for good user agent behavior.</p>
|
|
|
|
<p>This document does not incriminate specific user agents. W3C does not generally track bugs or errors in implementations. That information is generally tracked by the vendors themselves or third parties.</p>
|
|
|
|
|
|
<h2><a name="sotd" id="sotd">Status of this document</a></h2>
|
|
<h3><a name="sotd-pub-status" id="sotd-pub-status">Publication status</a></h3>
|
|
|
|
<p>This document is an update of an already published <a
|
|
href="http://www.w3.org/Consortium/Process/tr.html#Notes">Note</a>, published on January 28th,
|
|
2003, and made available for discussion only by the editor and authors as part of their work as
|
|
W3C Team participants in the <a href="http://www.w3.org/QA/">Quality Assurance</a>
|
|
<a href="http://www.w3.org/QA/Activity">Activity</a>.
|
|
Publication of this Note by W3C does not imply endorsement by W3C,
|
|
including the W3C Team and Membership.
|
|
</p>
|
|
|
|
<p>This document may be updated, replaced, or obsoleted by other documents
|
|
at any time.</p>
|
|
|
|
<h3><a name="sotd-comments" id="sotd-comments">Comments</a></h3>
|
|
|
|
<p>No formal commitment is made by W3C to invest additional
|
|
resources in topics addressed by this Note. However, comments are welcome
|
|
and the W3C <a href="http://www.w3.org/QA/">Quality Assurance</a> Team
|
|
may publish an amended version should the amount and quality
|
|
of the received comments prove it worthwhile or necessary. Though some of the previous comments has been added to this version. Some of them are still in discussion and might be added in a future version. We plan to publish in the next few months a new and improved version of this document to have the same organization than the <a href="http://www.w3.org/TR/chips"><acronym title="Common HTTP Implementation Problems">CHIPS</acronym></a> note. The problems related to XHTML, DOCTYPE and namespaces will be addressed in this future version.</p>
|
|
|
|
<p>Please send comments to the
|
|
<a href="http://lists.w3.org/Archives/Public/www-qa/">publicly archived</a>
|
|
mailing-list of the
|
|
<a href="http://www.w3.org/QA/IG/">Quality Assurance Interest Group</a>:
|
|
<a href="mailto:www-qa@w3.org">www-qa@w3.org</a>.
|
|
</p>
|
|
|
|
<p>A list of <a href="http://www.w3.org/QA/2002/12/cuap-errata">acknowledged
|
|
errors and proposed corrections</a> can be found at
|
|
http://www.w3.org/QA/2002/12/cuap-errata.</p>
|
|
|
|
<h3><a name="sotd-translat" id="sotd-translat">Translation</a></h3>
|
|
<p>Translation of this document is welcome. However, before
|
|
starting a translation of this document, please be sure to read the
|
|
<a href="http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#translate">
|
|
information on translations</a>, in our
|
|
<a href="http://www.w3.org/Consortium/Legal/IPR-FAQ.html">
|
|
Copyright <abbr title="Frequently Asked Questions">FAQ</abbr></a>,
|
|
and check the <a href="http://www.w3.org/QA/translations#cuap">
|
|
list of existing translations</a> of this document (available at
|
|
http://www.w3.org/QA/translations#cuap).
|
|
.</p>
|
|
|
|
<h3><a name="sotd-othertr" id="sotd-othertr">Other W3C Technical Reports and publications</a></h3>
|
|
<p>A list of current <a href="http://www.w3.org/TR/">W3C technical
|
|
reports and publications</a>, including Working Drafts and Notes,
|
|
can be found at http://www.w3.org/TR/.</p>
|
|
|
|
<hr />
|
|
|
|
<h2><a name="contents" id="contents">Table of Contents</a></h2>
|
|
|
|
<ul class="toc">
|
|
<li><a href="#intro">Introduction</a></li>
|
|
<li><a href="#usability">1. Usability</a></li>
|
|
<li><a href="#rendering">2. Rendering</a></li>
|
|
<li><a href="#protocols">3. Protocols implementation</a></li>
|
|
<li><a href="#uri">4. URI handling</a></li>
|
|
<li><a href="#acknowledgments">Acknowledgments</a></li>
|
|
<li><a href="#references">References</a></li>
|
|
</ul>
|
|
|
|
<hr />
|
|
<h2><a name="intro" id="intro">Introduction</a></h2>
|
|
|
|
<p>This document explains some common mistakes in user agents (browsers, spiders, etc.) due to incorrect or incomplete implementation of specifications, and suggests remedies. It also suggests "good behavior" where specifications themselves do not specify any particular behavior (e.g., in the face
|
|
of error conditions).</p>
|
|
|
|
<p>This document only deals with the client-side aspect of
|
|
<acronym title="the Hypertext Transfer Protocol">HTTP</acronym>,
|
|
people looking for <acronym title="the Hypertext Transfer Protocol">HTTP</acronym> implementation problems in Web servers should have a look at the Web server counterpart of this document: <cite><a href="/TR/chips">Common <acronym title="Hypertext Transfer Protocol">HTTP</acronym> Implementation Problems</a></cite> [<a href="#ref-CHIPS">CHIPS</a>].</p>
|
|
|
|
<p>This document does not address accessibility issues for user agents. Please refer to W3C's <cite><a href="/TR/UAAG10/">User Agent Accessibility Guidelines 1.0</a></cite> [<a href="#UAAG10">UAAG10</a>] for information on how to design user agents that are accessible to people with disabilities.</p>
|
|
|
|
<h3><a name="scope" id="scope">Scope of this document</a></h3>
|
|
|
|
<p id="scope-targets">This document is a set of known problems and/or good practices for user agents implementations and their use, aimed at:</p>
|
|
<ul>
|
|
<li>developers implementing browsers, Web clients,</li>
|
|
<li>developers implementing spiders, proxies, when they act as a client.</li>
|
|
</ul>
|
|
|
|
<p>Unless specifically mentioned, what is referred throughout this document as
|
|
<acronym title="Hypertext Transfer Protocol">HTTP</acronym> is RFC2616,
|
|
<abbr title="also known as">a.k.a.</abbr>
|
|
<cite><acronym title="Hypertext Transfer Protocol">HTTP</acronym>/1.1</cite>
|
|
[<a href="#RFC2616">RFC2616</a>].</p>
|
|
|
|
<h3><a name="conformance" id="conformance">Conformance to this document</a></h3>
|
|
<p><strong>This document is informative</strong>.</p>
|
|
|
|
<p> This document has no conformance <em>per se</em>, but since it is about
|
|
implementation of normative specifications (such as the
|
|
<acronym title="the Hypertext Transfer Protocol">HTTP</acronym>/1.1 specification), or their use, one should consider following the guidelines and checkpoints described here as a good step toward conformance to these normative specifications.</p>
|
|
|
|
<p>As often as possible, references will be mentioned for each checkpoint.</p>
|
|
|
|
<p>This document uses RFC 2119 [<a href="#RFC2119">RFC2119</a>] keywords
|
|
(capitalized MUST, MAY, SHOULD etc.) when referring to behaviors clearly defined
|
|
by a normative specification. When not capitalized, these words should be interpreted as regular language and not as RFC2119 keywords.</p>
|
|
|
|
<hr />
|
|
|
|
<h2><a id="usability" name="usability">1. Usability</a></h2>
|
|
|
|
<p>This section focuses on the user's experience, including
|
|
customization, user interface, and other usability issues. Some of the checkpoints suggested here depends on the user agents used and can be sometimes not applicable in terms of implementations. </p>
|
|
|
|
<dl class="checkpoints">
|
|
<dt><b><a id="cp-anchor-position" name="cp-anchor-position">1.1</a></b> When the user follows a link to a target anchor, highlight the target location.</dt>
|
|
|
|
<dd><p>Techniques:</p>
|
|
|
|
<ul>
|
|
<li>Put the target location at a consistent location in the <a
|
|
href="http://www.w3.org/TR/2000/PR-UAAG10-20000310/#def-viewport" title="Definition of viewport">viewport</a> (e.g., at the top of a graphical viewport).</li>
|
|
<li>Allow configuration to highlight (e.g., through audio cues, graphically, etc.) the target location. Ensure that highlight mechanisms are distinguishable from other highlight mechanisms.</li>
|
|
</ul>
|
|
|
|
<p>References:</p>
|
|
|
|
<ul>
|
|
<li>see 'Selectors' for information about the CSS and the '<a href="http://www.w3.org/TR/css3-selectors/#target-pseudo">:target</a>' selector <cite>[<a
|
|
href="#SELECTORS">SELECTORS</a>]</cite></li>
|
|
</ul>
|
|
|
|
</dd>
|
|
|
|
<dt><b><a id="cp-broken-uri" name="cp-broken-uri">1.2</a></b> If the user attempts to follow a link that is broken because it designates a missing anchor, let the user know it is broken.</dt>
|
|
|
|
<dd><p>There are many ways to indicate to the user that a link is broken. The recommended behavior is as follows:</p>
|
|
|
|
<ul>
|
|
<li>Do not scroll or otherwise change the viewport. This could make the user believe the link is not broken.</li>
|
|
|
|
<li>Indicate to the user (e.g., via a text message in the status bar) that the link is broken. If no message is given to the user, they will not understand why the viewport didn't move.</li>
|
|
|
|
<li>Ensure that any non-text message to the user has a text equivalent; text may be rendered as visually displayed text, synthesized speech, and braille. Audio cues or visual cues may be used in addition to text messages.</li>
|
|
|
|
</ul>
|
|
|
|
<p><strong>Wrong:</strong> Some user agents scroll to the top or
|
|
bottom of the document when the user attempts to follow a broken
|
|
link. This behavior is discouraged since it is indistinguishable from the
|
|
correct behavior when a target is at the beginning or end of a
|
|
document.</p>
|
|
|
|
<p>References:</p>
|
|
|
|
<ul>
|
|
<li>For information about accessible user interfaces, please refer
|
|
to the User Agent Accessibility Guidelines 1.0 <cite>[<a
|
|
href="#UAAG10">UAAG10</a>]</cite>.
|
|
<blockquote cite="http://www.w3.org/TR/2002/REC-UAAG10-20021217/guidelines.html#tech-ui-text-eq">
|
|
<p>1.3 <a href="http://www.w3.org/TR/2002/REC-UAAG10-20021217/guidelines.html#tech-ui-text-eq">Provide text messages</a></p>
|
|
|
|
<p> 1. Ensure that every message (e.g., prompt, alert, or
|
|
notification) that is a non-text element and is part of the
|
|
user agent user interface has a text equivalent.</p>
|
|
</blockquote>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
<dt><b><a id="cp-retrieve-all" name="cp-retrieve-all">1.3</a></b>
|
|
Allow the user to retrieve Web resources even if the browser cannot
|
|
render them.</dt>
|
|
|
|
<dd><p>User agents may not be able to render certain types of content on
|
|
the Web either natively or through a plug-in (e.g., XML content,
|
|
XSLT style sheets, RDF documents, DTDs, XML schemas, etc).
|
|
User agents should allow users to retrieve and save these resources,
|
|
otherwise users may not be able to access this Web content at
|
|
all.</p></dd>
|
|
|
|
<dt><b><a id="cp-print-frames" name="cp-print-frames">1.4</a></b> When
|
|
the user requests to print a frameset, allow the user to select to
|
|
print an individual frame or the frameset.</dt>
|
|
|
|
<dd><p>The presentation of the frameset could be achieved, for
|
|
example, by:</p>
|
|
|
|
<ul>
|
|
<li>proposing a list of frames to the user.</li>
|
|
<li>using a graphical representation of the organization of the frames.</li>
|
|
</ul>
|
|
|
|
<p><strong>Note:</strong> The authors do not encourage Web content
|
|
developers to use frames as they can cause many usability and
|
|
accessibility problems.</p>
|
|
|
|
<p>References:</p>
|
|
|
|
<ul>
|
|
<li>HTML frames are specified in <a
|
|
href="http://www.w3.org/TR/1999/REC-html401-19991224/present/frames">
|
|
section 16 of the HTML 4.01 Recommendation</a> <cite>[<a
|
|
href="#HTML401">HTML 4.01</a>]</cite>.</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
<dt><b><a id="cp-uri-schemes" name="cp-uri-schemes">1.5</a></b>
|
|
Add support for new URI schemes in a straightforward way.</dt>
|
|
|
|
<dd><p>For instance, allow users to associate external programs with
|
|
URI schemes. The user agent should inform the user when it does not
|
|
recognize a URI scheme in content.</p>
|
|
|
|
<p>Example:</p>
|
|
|
|
<p>A user may want the "tel" scheme (e.g.,
|
|
<code>tel:+33-4-12-34</code>) to interact with their
|
|
telephone. Or they may want the "irc" scheme (e.g.,
|
|
<code>irc://irc.example.org/</code>) to activate an IRC client on
|
|
their desktop with a connection to the specified server.</p>
|
|
|
|
<p><strong>Wrong:</strong> Some user agents ignore the scheme part
|
|
(before the ":") when the scheme is unknown to them, interpret the
|
|
colon character as though it were encoded as '%3A' and then treat the
|
|
URI as though it were a relative URI, usually producing a broken link
|
|
(and confusing users).</p>
|
|
|
|
<p>References:</p>
|
|
|
|
<ul>
|
|
<li>From section 3 of "Uniform Resource Identifiers (URI):
|
|
Generic Syntax" <cite>[<a href="#RFC2396">RFC2396</a>]</cite>:
|
|
<blockquote>
|
|
<p>An absolute URI contains the name of the scheme being used
|
|
followed by a colon (":") and then a string whose interpretation
|
|
depends on the scheme.</p>
|
|
</blockquote></li>
|
|
|
|
<li>Refer to information about URI schemes in section 3.1 of
|
|
"Uniform Resource Identifiers (URI): Generic Syntax" <cite>[<a
|
|
href="#RFC2396">RFC2396</a>]</cite>.</li>
|
|
<li>For a list of known URI schemes, see
|
|
"An Index of WWW Addressing Schemes" <cite>[<a
|
|
href="#SCHEMES">SCHEMES</a>]</cite>.</li>
|
|
<li>For a list of the Official IANA Registry of URI Schemes, see
|
|
"Uniform Resource Identifier (URI) SCHEMES" <cite>[<a
|
|
href="#SCHEMES-IANA">SCHEMES-IANA</a>]</cite>.</li>
|
|
<li>To register an URI scheme, see
|
|
"Registration Procedures for URL Scheme Names" <cite>[<a
|
|
href="#RFC2717">SCHEMES</a>]</cite>.</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
<dt><b><a id="cp-keyword" name="cp-keyword">1.6</a></b> Allow the user
|
|
to override any mechanism for guessing URIs or keywords.</dt>
|
|
|
|
<dd><p>Many user agents compensate for incomplete URIs by applying a
|
|
series of transformations with the hope of creating a URI that
|
|
works. For example, many user agents transform the string <code>
|
|
www.w3.org</code> into the URI <code>http://www.w3.org/</code>. The
|
|
user should be able to control whether, for example, typing a
|
|
keyword should invoke a Web search or whether the user agent
|
|
should prepend <code>http://www.</code> and append <code>
|
|
.org/</code>.</p></dd>
|
|
|
|
<dt><b><a id="cp-warn-incomplete" name="cp-warn-incomplete">1.7</a></b>
|
|
Warn users about incomplete documents and transfers.</dt>
|
|
|
|
<dd><p>Rendering an incomplete document as though it were complete is
|
|
very likely to confuse users. Part of the document is missing, hence
|
|
some anchors might not be present, possibly breaking some links. The
|
|
user agent should notify the user that the document is incomplete.</p>
|
|
|
|
<p>The HTTP/1.1 specification describes this behavior for caches at
|
|
the protocol level. Partial responses should also be made obvious to
|
|
the user with a warning.</p>
|
|
|
|
<p>References:</p>
|
|
|
|
<ul>
|
|
<li>The correct behavior is specified in <a
|
|
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.8">
|
|
section 13.8</a> of the HTTP/1.1 specification <cite>[<a
|
|
href="#RFC2616">RFC2616</a>]</cite>.
|
|
<blockquote>
|
|
<p>
|
|
A cache MUST NOT return a partial response to a client without
|
|
explicitly marking it as such, using the 206 (Partial Content) status
|
|
code. A cache MUST NOT return a partial response using a status code
|
|
of 200 (OK).
|
|
</p></blockquote>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
<dt><b><a id="cp-flush-auth" name="cp-flush-auth">1.8</a></b>
|
|
Provide a mechanism to allow authentication information to
|
|
expire.</dt>
|
|
|
|
<dd><p>Many browsers allow configuration to save HTTP authentication
|
|
<cite>[<a href="#RFC2616">RFC2616</a>, <a
|
|
href="#RFC2617">RFC2617</a>]</cite> information ("remember my
|
|
password"). They should also allow users to "flush" that
|
|
authentication information on request. For instance, the user may wish
|
|
to leave the user agent running but tell it to forget the password
|
|
to access the user's bank account.</p>
|
|
|
|
<p><strong>Wrong:</strong> Most user agents consider that
|
|
authentication information (e.g., password) provided by a user for a
|
|
server/realm pair during a session is immutable for the duration of
|
|
the session.</p>
|
|
</dd>
|
|
|
|
<dt><b><a id="cp-view-metadata" name="cp-view-metadata">1.9</a></b>
|
|
When a Web resource includes metadata that may be recognized by the
|
|
user agent, allow the user to view that metadata.</dt>
|
|
|
|
<dd><p>Metadata – data about data – can provide very useful context
|
|
to users about information on the Web. For instance, metadata about
|
|
a book might include the book's author, title, publication date,
|
|
publisher, etc. (refer to the Dublin Core <cite>[<a
|
|
href="#DC">DC</a>]</cite> for information about library-type
|
|
metadata). Authors include metadata in HTML documents through a
|
|
variety of elements and attributes (e.g., the <code>TITLE</code>
|
|
and <code>ADDRESS</code> elements, the "alt", "title", and
|
|
"summary" attributes, etc. Languages such as the Resource
|
|
Description Framework [<a href="#RDF10">RDF</a>] allow users to
|
|
populate the Web with rich metadata. User agents should provide a user
|
|
interface to allow users to view metadata. The user interface may
|
|
vary according to the underlying markup language. For instance,
|
|
many graphical browsers render the HTML "title" attribute (e.g., as
|
|
a tool-tip) when the user selects or hovers over an element with
|
|
that attribute specified.</p>
|
|
|
|
<p>References:</p>
|
|
|
|
<ul>
|
|
<li>Some projects that address the display of metadata are linked
|
|
from the <a href="http://www.w3.org/RDF/">RDF home page</a> at the
|
|
W3C Web site.</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
<dt><b><a id="cp-save-post" name="cp-save-post">1.10</a></b> Allow
|
|
the user to keep track of completed HTTP POST requests.</dt>
|
|
|
|
<dd><p>Users may wish to track and archive HTTP POST requests for the
|
|
same reasons they wish to track and archive email. For instance, if
|
|
the user places a book order through a form, and that form uses a POST
|
|
request, the user should be able to store information about that
|
|
transaction.</p>
|
|
|
|
<p>References:</p>
|
|
|
|
<ul>
|
|
<li>HTTP/1.1 POST requests are described in section 9.5 of the
|
|
HTTP/1.1 specification <cite>[<a
|
|
href="#RFC2616">RFC2616</a>]</cite>.</li>
|
|
|
|
<li>"Axioms of Web architecture: User Agent watch points"
|
|
<cite>[<a href="#UAWP">UAWP</a>]</cite>.</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
<dt><b><a id="cp-bm-neg" name="cp-bm-neg">1.11</a></b> Allow the user
|
|
to bookmark negotiated resources.</dt>
|
|
|
|
<dd>
|
|
<p>The HTTP/1.1 protocol <cite>[<a href="#RFC2616">RFC2616</a>]</cite>
|
|
allows the client to request a representation of a resource which is
|
|
best suited to its needs (language, media type, etc); this mechanism
|
|
is called "content negotiation".</p>
|
|
|
|
<p>When a resource is negotiated, the user might want to bookmark a
|
|
particular version. For example, a document might be available in
|
|
several languages under the same URI, and the user might want to point
|
|
somebody to the Canadian version of this document, which has a different
|
|
URI.</p>
|
|
|
|
<p>In such a case, it should be possible to bookmark either the
|
|
original URI or the URI of the view that the user got. The original
|
|
URI can be interpreted as being the generic object and the retrieved
|
|
document as one view of this object.</p>
|
|
|
|
<p>
|
|
Bookmarking a particular version of a
|
|
negotiated resource is not always possible under HTTP semantics, because
|
|
a) the particular version may not have its own URI and b) even if it does,
|
|
HTTP does not guarantee that the user agent will be informed of this.
|
|
</p>
|
|
|
|
<p>
|
|
HTTP/1.1 defines the Content-Location header field as the way for the
|
|
server to indicate the URI of the variant, and some servers do supply
|
|
this Content-Location when negotiation took place most of the time.
|
|
However, Content-Location is also used for some other things, and its
|
|
inclusion in a response does not necessarily mean that content
|
|
negotiation took place. </p>
|
|
|
|
<p>References:</p>
|
|
|
|
<ul>
|
|
<li>For more information on content negotiation, see <a
|
|
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec12.html">section
|
|
12 of the HTTP/1.1 specification</a>, <cite>[<a
|
|
href="#RFC2616">RFC2616</a>]</cite>.</li>
|
|
<li>Checkpoint about <a href="#cp-temp-redir">temporary redirects</a>.</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
<dt><b><a id="cp-xfer-encoding" name="cp-xfer-encoding">1.12</a></b>
|
|
Support time-saving transfer encoding mechanisms and send out <acronym title="Transfert Encoding">TE</acronym> headers announcing their support.
|
|
</dt>
|
|
|
|
<dd><p>HTTP/1.1 <cite>[<a href="#RFC2616">RFC2616</a>]</cite> allows
|
|
transfer encoding. An example of encoding is data compression, which
|
|
speeds up Web browsing over a slow connection.</p>
|
|
|
|
<p>The HTTP/1.1 transfer encoding negotiation mechanism has been designed to avoid the need for the end user to get involved. Using the HTTP protocol, the server, proxy, and client implementations among themselves will be able to choose and use the most efficient transfer encoding. The more you support such mechanisms, the better it is.</p>
|
|
|
|
<p>Users might have enough knowledge or have help of user interfaces to fine-tune this process beyond what can be done automatically. The user agent should allow the user to set the transfer encoding in the HTTP requests sent out.</p>
|
|
|
|
<p>References:</p>
|
|
|
|
<ul>
|
|
<li>Refer to information about the "TE" request header, described
|
|
in <a
|
|
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.39">
|
|
section 14.39</a> of the HTTP/1.1 specification <cite>[<a
|
|
href="#RFC2616">RFC2616</a>]</cite>.</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
<dt><b><a name="cp-laneg-def" id="cp-laneg-def">1.13</a></b> Use the user interface language as the default value for language
|
|
negotiation.</dt>
|
|
|
|
<dd><p>The user should be allowed to specify the set of languages that
|
|
the user agent may use for language negotiation.</p>
|
|
|
|
<p>
|
|
In case the user does not specify any language, the user agent may
|
|
specify the language of its user interface as the preferred language,
|
|
while allowing other languages with a lower preference, for example by
|
|
sending</p>
|
|
|
|
<pre>
|
|
Accept-Language: dk, *;q=0.5
|
|
</pre>
|
|
|
|
|
|
<p>References:</p>
|
|
<ul>
|
|
<li>For more information on content negotiation, see <a
|
|
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec12.html">section
|
|
12 of the HTTP/1.1 specification</a>, <cite>[<a
|
|
href="#RFC2616">RFC2616</a>]</cite>.</li>
|
|
<li>For more information about the HTTP <code>Accept-Language</code> header,
|
|
see <a
|
|
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4">section
|
|
14.4 of the HTTP/1.1 specification</a>, <cite>[<a
|
|
href="#RFC2616">RFC2616</a>]</cite>.</li>
|
|
<li>For information about privacy issues related to the
|
|
<code>Accept-Language</code> header, see <a
|
|
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec15.html#sec15.1.4">section
|
|
15.1.4 of the HTTP/1.1 specification</a>, <cite>[<a
|
|
href="#RFC2616">RFC2616</a>]</cite>.</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
<dt><b><a id="cp-accept-encoding" name="cp-accept-encoding">1.14</a></b> Only advertise an encoding in <code>Accept-encoding</code> that you really accept.</dt>
|
|
|
|
<dd><p>A number of web sites suffer from bandwidth overload. By altering the server side scripting engine to support encoding compression
|
|
or by inserting a compressing proxy, it is possible to dramatically reduce the
|
|
operating costs. The down side is that a number of user agents advertise
|
|
that they can handle gzip or deflate when they really are unable to do it.</p>
|
|
|
|
<p>References:</p>
|
|
<ul>
|
|
<li>For more information on content negotiation, see <a
|
|
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec12.html#sec12.2">section
|
|
12 of the HTTP/1.1 specification</a>, <cite>[<a
|
|
href="#RFC2616">RFC2616</a>]</cite>.</li>
|
|
<li>For more information about the HTTP <code>Accept-Encoding</code> header,
|
|
see <a
|
|
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3">section
|
|
14.4 of the HTTP/1.1 specification</a>, <cite>[<a
|
|
href="#RFC2616">RFC2616</a>]</cite>.</li>
|
|
</ul>
|
|
|
|
</dd>
|
|
|
|
<dt><b><a id="cp-redirect-memo" name="cp-redirect-memo">1.15</a></b> Remember traverse redirects </dt>
|
|
|
|
<dd><p>
|
|
When the browser traverses a redirect, it should remember both the original URI and the target URI for marking links as visited.
|
|
</p>
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
<h2><a id="rendering" name="rendering">2. Rendering</a></h2>
|
|
|
|
<p>This section focuses on issues related to style sheets and link
|
|
types.</p>
|
|
|
|
<dl class="checkpoints">
|
|
<dt><b><a id="cp-select-style" name="cp-select-style">2.1</a></b>
|
|
Implement user style sheets. Allow the user to select from author and
|
|
user style sheets or to ignore them.</dt>
|
|
|
|
<dd><p>A style sheet is a set of rules that specifies how to render a
|
|
document on a graphical desktop computer monitor, on paper, as
|
|
synthesized speech, etc. A document may have more than one style
|
|
sheet associated with it, and users should be able to select from
|
|
alternative style sheets.</p>
|
|
|
|
<p>References:</p>
|
|
|
|
<ul>
|
|
<li>For information about associating style sheets with an HTML
|
|
document, refer to <a
|
|
href="http://www.w3.org/TR/1999/REC-html401-19991224/present/styles.html#h-14.3">
|
|
section 14.3 of the HTML 4.01 Recommendation</a> <cite>[<a
|
|
href="#HTML401">HTML 4.01</a>]</cite>.</li>
|
|
|
|
<li>For XML, refer to the "Associating Style Sheets with XML
|
|
documents" Recommendation <cite>[<a
|
|
href="#XML-STYLE">XML-STYLE</a>]</cite>.</li>
|
|
|
|
<li>User selection of style sheets is a requirement of the User
|
|
Agent Accessibility Guidelines 1.0 <cite>[<a
|
|
href="#UAAG10">UAAG10</a>], <a href="http://www.w3.org/TR/2002/REC-UAAG10-20021217/guidelines.html#tech-select-style-sheets">checkpoint 4.14</a></cite>.</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
<dt><b><a id="cp-media-desc" name="cp-media-desc">2.2</a></b>
|
|
Respect media descriptors when applying style sheets.</dt>
|
|
|
|
<dd><p>Some markup and style sheet languages allow authors
|
|
(e.g., <code>@media</code> construct in <cite>[<a
|
|
href="#CSS2">CSS2</a>]</cite>, <code>media</code> attribute in <cite>[<a
|
|
href="#HTML401">HTML 4.01</a>]</cite>) to design
|
|
documents that are rendered differently according to the
|
|
characteristics of the output device: whether graphical display,
|
|
television screen, handheld device, speech synthesizer, braille
|
|
display, etc.</p>
|
|
|
|
<p>References:</p>
|
|
|
|
<ul>
|
|
<li>For information about media descriptors in HTML 4.01, please
|
|
refer to <a
|
|
href="http://www.w3.org/TR/1999/REC-html401-19991224/types.html#type-media-descriptors">
|
|
section 6.13 of the HTML 4.01 Recommendation</a> <cite>[<a
|
|
href="#HTML401">HTML 4.01</a>]</cite>.</li>
|
|
|
|
<li>For information about media types in CSS2, please refer to <a
|
|
href="http://www.w3.org/TR/1998/REC-CSS2-19980512/media">section 7
|
|
of the CSS2 Recommendation</a> <cite>[<a
|
|
href="#CSS2">CSS2</a>]</cite>.</li>
|
|
|
|
<li>For information about negotiation of device capabilities,
|
|
please refer to the W3C Note "Composite Capability/Preference
|
|
Profiles" [<a href="#CCPP">CC/PP</a>].</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
<dt><b><a id="cp-ignore-missing-style"
|
|
name="cp-ignore-missing-style">2.3</a></b> If a CSS style sheet is
|
|
missing, ignore it and continue processing.</dt>
|
|
|
|
<dd><p>Users must be able to view content even without CSS style
|
|
sheets.</p>
|
|
|
|
<p><strong>Wrong:</strong> In some user agents, missing style sheets
|
|
result in a fatal error or result in the user agent not rendering
|
|
content.</p>
|
|
|
|
<p>References:</p>
|
|
|
|
<ul>
|
|
<li>From <a
|
|
href="http://www.w3.org/TR/1998/REC-CSS2-19980512/conform.html#conformance">
|
|
section 3.2 of the CSS2 Recommendation</a>, <cite>[<a
|
|
href="#CSS2">CSS2</a>]</cite>:
|
|
|
|
<blockquote>
|
|
<p>For each source document, [a user agent] must attempt to retrieve
|
|
all associated style sheets that are appropriate for the supported
|
|
media types. If it cannot retrieve all associated style sheets (for
|
|
instance, because of network errors), it must display the document
|
|
using those it can retrieve.</p>
|
|
</blockquote>
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
<dt><b><a id="cp-link-types" name="cp-link-types">2.4</a></b>
|
|
Implement the HTML 4 recognized link types.</dt>
|
|
|
|
<dd><p><a
|
|
href="http://www.w3.org/TR/1999/REC-html401-19991224/types.html#type-links">Section
|
|
6.12 of the HTML 4.01 Recommendation</a> <cite>[<a
|
|
href="#HTML401">HTML 4.01</a>]</cite> lists some link types that may
|
|
be used by authors to make assertions about linked Web
|
|
resources. These include <code>alternate</code>, <code>
|
|
stylesheet</code>, <code>start</code>, <code>next</code>, <code>
|
|
prev</code>, <code>contents</code>, <code>glossary</code>, and others.
|
|
Although the HTML 4.01 specification does not specify definitive
|
|
rendering or behavior for these link types, user agents should
|
|
interpret them in useful ways. For instance, the <code>start</code>,
|
|
<code>next</code>, <code>prev</code>, and <code>contents</code> link
|
|
types may be used to build a table of contents, or may be used to
|
|
identify the print order of documents, etc.</p></dd>
|
|
|
|
</dl>
|
|
|
|
<h2><a id="protocols" name="protocols">3. Protocols implementation</a></h2>
|
|
|
|
<p>This section focuses on the implementation of network protocols
|
|
used to download resources from the Web.</p>
|
|
|
|
<dl class="checkpoints">
|
|
|
|
<dt><b><a id="cp-save-filenames" name="cp-save-filenames">3.1</a></b> Save
|
|
resources retrieved from the Web on the local system using the
|
|
appropriate system naming conventions.</dt>
|
|
|
|
<dd>
|
|
|
|
<p>The media type of a resource retrieved by HTTP <cite>[<a
|
|
href="#RFC2616">RFC2616</a>]</cite> is determined by the content type
|
|
and encoding returned by the server in the response headers.</p>
|
|
|
|
<p>If the user wants to save a resource locally, the user agent should
|
|
respect the system naming conventions for files (e.g. PNG images
|
|
usually have a <code>.png</code> extension).</p>
|
|
|
|
<p>Example:</p>
|
|
|
|
<p><code>http://www.w3.org/TR/1999/REC-html401-19991224/html40.ps</code>
|
|
is a view of the gzip'ed PostScript version of the HTML 4.01
|
|
specification. The HTTP headers sent by the server include:</p>
|
|
|
|
<pre>
|
|
Content-Type: application/postscript; qs=0.001
|
|
Content-Encoding: gzip
|
|
</pre>
|
|
|
|
<p>If saved locally, the filename on most computers should be
|
|
<code>html40.ps.gz</code> for the applications to recognize the file
|
|
type.</p>
|
|
|
|
<p><strong>Wrong:</strong> Saving this compressed PostScript document
|
|
as <code>html40.ps</code> is likely to confuse other applications.</p>
|
|
|
|
<p>References:</p>
|
|
|
|
<ul>
|
|
<li>RFC1630 <cite>[<a href="#RFC1630">RFC1630</a>]</cite> specifies
|
|
that URIs are opaque to the client.</li>
|
|
|
|
<li>Content type information is described in <a
|
|
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec7.html#sec7.2.1">section
|
|
7.2.1 of the HTTP/1.1 specification</a>, <cite>[<a
|
|
href="#RFC2616">RFC2616</a>]</cite>.</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
<dt><b><a id="cp-no-override-ct" name="cp-no-override-ct">3.2</a></b>
|
|
Respect the media type of a resource if one is explicitly given using
|
|
the <code>Content-Type</code> HTTP header.</dt>
|
|
|
|
<dd><p>Example:</p>
|
|
|
|
<p>If an HTML document is returned with a <code>Content-Type</code>
|
|
value of <code>text/plain</code>, the user agent must NOT render the
|
|
document with another guessed Content-Type (like, for example, text/html).</p>
|
|
|
|
<p>Reference:</p>
|
|
|
|
<ul>
|
|
<li><p>From <a
|
|
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec7.html#sec7.2.1">section
|
|
7.2.1 of the HTTP/1.1 specification</a>, <cite>[<a
|
|
href="#RFC2616">RFC2616</a>]</cite>:
|
|
</p>
|
|
|
|
<blockquote>
|
|
<p>
|
|
If and only if the media type is not given by a Content-Type field,
|
|
the recipient MAY attempt to guess the media type via inspection of
|
|
its content and/or the name extension(s) of the URI used to identify
|
|
the resource.
|
|
</p>
|
|
</blockquote>
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
</dd>
|
|
|
|
<dt><b><a id="cp-no-override-cs" name="cp-no-override-cs">3.3</a></b>
|
|
Respect the character set of a resource when one is explicitly
|
|
given.</dt>
|
|
|
|
<dd>
|
|
<p>User agents must respect the character set when it is explicitly
|
|
specified in the response. The character set can be given by the HTTP
|
|
<code>Content-Type</code> headers and/or by the document-internal
|
|
fallback (HTML <code>meta</code> element, etc).</p>
|
|
|
|
<p>References:</p>
|
|
|
|
<ul>
|
|
<li>From <a
|
|
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.4.1">
|
|
section 3.4.1 of the HTTP/1.1 specification</a>, <cite>[<a
|
|
href="#RFC2616">RFC2616</a>]</cite>:
|
|
|
|
<blockquote>
|
|
<p>HTTP/1.1 recipients MUST respect the charset label provided by the
|
|
sender; and those user agents that have a provision to "guess" a
|
|
charset MUST use the charset from the <code>content-type</code> field if they
|
|
support that charset [..].</p>
|
|
</blockquote>
|
|
</li>
|
|
<li>From <a
|
|
href="http://www.w3.org/TR/html4/charset.html#h-5.2.2">section 5.2.2
|
|
of the HTML 4.01 Recommendation</a>, <cite>[<a href="#HTML401">HTML
|
|
4.01</a>]</cite>:
|
|
|
|
<blockquote>
|
|
<p>To sum up, conforming user agents must observe the following
|
|
priorities when determining a document's character encoding (from
|
|
highest priority to lowest):</p>
|
|
|
|
<ol>
|
|
<li>An HTTP "charset" parameter in a
|
|
"<code>Content-Type</code>" field.</li>
|
|
|
|
|
|
<li>A <samp>META</samp> declaration with "<code>http-equiv</code>" set to
|
|
"<code>Content-Type</code>" and a value set for "charset".</li>
|
|
|
|
<li>The <samp>charset</samp> attribute set on an element that designates an
|
|
external resource.</li>
|
|
</ol>
|
|
</blockquote>
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</dd>
|
|
|
|
|
|
<dt><b><a id="cp-temp-redir" name="cp-temp-redir">3.4</a></b> Do not
|
|
treat HTTP temporary redirects as permanent redirects.</dt>
|
|
|
|
<dd>
|
|
<p>The HTTP/1.1 specification <cite>[<a
|
|
href="#RFC2616">RFC2616</a>]</cite> specifies several types of
|
|
redirects. The two most common are designated by the codes 301
|
|
(permanent) and 302 or 307 (temporary):</p>
|
|
<ul>
|
|
<li> A 301 redirect means that the resource has been moved
|
|
permanently and the original requested URI is out-of-date.</li>
|
|
<li>A 302 or 307 redirect, on the other hand, means that the resource has a
|
|
temporary URI, and the original URI is still expected to work in
|
|
the future. The user should be able to bookmark, copy, or link to the
|
|
original (persistent) URI or the result of a temporary redirect.</li>
|
|
</ul>
|
|
|
|
<p><strong>Wrong:</strong> User agents usually show the user (in the
|
|
user interface) the URI that is the result of a temporary (302 or 307)
|
|
redirect, as they would do for a permanent (301) redirect.</p>
|
|
|
|
<p>References:</p>
|
|
|
|
<ul>
|
|
<li>For more information about HTTP/1.1 response codes 301 and 302,
|
|
refer to <a
|
|
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.2">
|
|
section 10.3.2</a> and <a
|
|
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.3">
|
|
section 10.3.3</a>, respectively, of the HTTP/1.1 specification <cite>[<a
|
|
href="#RFC2616">RFC2616</a>]</cite>.</li>
|
|
|
|
<li>Refer to "Axioms of Web architecture: User Agent watch points"
|
|
<cite>[<a href="#UAWP">UAWP</a>]</cite>.</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
<dt><b><a id="cp-use-dns-info" name="cp-use-dns-info">3.5</a></b> If a
|
|
host name has multiple <acronym title="Domain Name
|
|
System">DNS</acronym> entries, try them all before concluding that the
|
|
Web site is down.</dt>
|
|
|
|
<dd>
|
|
<p>
|
|
Many Web sites have a single hostname like www.example.org resolve to
|
|
multiple servers for the purpose of load balancing or mirroring. If
|
|
one server is unreachable, others may still be up, so browsers should
|
|
try to contact all the servers of a Web site before concluding that
|
|
the Web site is down.
|
|
</p>
|
|
<p>
|
|
For example, the <a href="http://www.w3.org/Library/">libwww implementation</a> does it the right way and check the response time of all ip address, once done it sorts all the address to get the best one. An example is available in the open source implementation of the <a href="http://www.w3.org/Library/src/HTDNS.html">Domain Name Service Class</a>.
|
|
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
<dt><b><a id="cp-http-accept" name="cp-http-accept">3.6</a></b> List only
|
|
supported media types in an HTTP <code>Accept</code> header.</dt>
|
|
|
|
<dd>
|
|
<p>HTTP/1.1 <cite>[<a href="#RFC2616">RFC2616</a>]</cite> defines
|
|
content negotiation. The client sending out a request gives a list of
|
|
media types that it is willing to accept; the server then returns a
|
|
representation of the object requested in one of the specified formats
|
|
if it is available.</p>
|
|
|
|
<p>When entities are embedded in a document (such as images in HTML
|
|
documents), user agents should only send <code>Accept</code> headers
|
|
for the formats they support.</p>
|
|
|
|
<p>Example:</p>
|
|
|
|
<p>If a user agent can render JPEG, PNG and GIF images, the list of
|
|
media types accepted should be <code>image/jpeg</code>,
|
|
<code>image/png</code>, <code>image/gif</code>.</p>
|
|
|
|
<p><strong>Wrong:</strong> User agent agents should not send an HTTP
|
|
header of <code>Accept: */*</code> since the server may support
|
|
content types that the user agent does not. For instance, if a server
|
|
is configured so that SVG images are preferred to PNG images, a user
|
|
agent that only supports PNG, GIF, and JPEG will receive (unsupported)
|
|
SVG rather than (supported) PNG.</p>
|
|
|
|
<p><strong>Note:</strong> Some user agents send a Accept header that has '*/*' at the end, after all of the supported content types. This way, the server is free to send the resource in any format, which can then be processed by the user with another tool.
|
|
</p>
|
|
|
|
<p>References:</p>
|
|
|
|
<ul>
|
|
<li>For more information on content negotiation, see <a
|
|
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec12.html">section
|
|
12 of the HTTP/1.1 specification</a>, <cite>[<a
|
|
href="#RFC2616">RFC2616</a>]</cite>.</li>
|
|
<li>For more information about the HTTP <code>Accept</code> header,
|
|
see <a
|
|
href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1">section
|
|
14.1 of the HTTP/1.1 specification</a>, <cite>[<a
|
|
href="#RFC2616">RFC2616</a>]</cite>.</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
<h2><a id="uri" name="uri">4. URI handling</a></h2>
|
|
|
|
<p>Resources are located on the Web using Uniform Resources
|
|
Identifiers <cite>[<a href="#RFC2396">RFC2396</a>]</cite>. This
|
|
section discusses how user agents should handle URIs.</p>
|
|
|
|
<dl class="checkpoints">
|
|
|
|
<dt><b><a id="cp-fragment" name="cp-fragment">4.1</a></b> Handle the
|
|
fragment identifier of a URI when the HTTP request is redirected.
|
|
</dt>
|
|
|
|
<dd><p>When a resource (<code>URI1</code>) has moved, an HTTP redirect
|
|
can indicate its new location (<code>URI2</code>).</p>
|
|
|
|
<p>If <code>URI1</code> has a fragment identifier <code>#frag</code>,
|
|
then the new target that the user agent should be trying to reach
|
|
would be <code>URI2#frag</code>. If <code>URI2</code> already has a
|
|
fragment identifier, then <code>#frag</code> must not be appended and
|
|
the new target is <code>URI2</code>.</p>
|
|
|
|
<p><strong>Wrong:</strong> Most current user agents do implement HTTP
|
|
redirects but do not append the fragment identifier to the new URI,
|
|
which generally confuses the user because they end up with the wrong
|
|
resource.</p>
|
|
|
|
<p>References:</p>
|
|
|
|
<ul>
|
|
<li>HTTP redirects are described in section 10.3 of the HTTP/1.1
|
|
specification <cite>[<a href="#RFC2616">RFC2616</a>]</cite>.</li>
|
|
|
|
<li>The required behavior is described in detail in "Handling of
|
|
fragment identifiers in redirected URLs" <cite>[<a
|
|
href="#RURL">RURL</a>]</cite>.</li>
|
|
|
|
<li>The term "Persistent Uniform Resource Locator (PURL)"
|
|
designates a URL (a special case of a URI) that points to another
|
|
one through an HTTP redirect. For more information, refer to
|
|
"Persistent Uniform Resource Locators" <cite>[<a
|
|
href="#PURL">PURL</a>]</cite>.</li>
|
|
</ul>
|
|
|
|
<p>Example:</p>
|
|
|
|
<p>Suppose that a user requests the resource at
|
|
<code>http://www.w3.org/TR/WD-ruby/#changes</code> and the server
|
|
redirects the user agent to <code>http://www.w3.org/TR/ruby/</code>.
|
|
Before fetching that latter URI, the browser should append the fragment
|
|
identifier <code>#changes</code> to it:
|
|
<code>http://www.w3.org/TR/ruby/#changes</code>.</p>
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
<h2><a name="acknowledgments" id="acknowledgments">Acknowledgments</a></h2>
|
|
|
|
<p>The editor would like to thank the following W3C Team members for the initial input that led to the creation of this document. Hugo Haas has been the main author of the first version of this document: </p>
|
|
<ul>
|
|
<li><a href="http://www.w3.org/People/Hugo/">Hugo Haas</a>, W3C</li>
|
|
<li><a href="http://www.w3.org/People/Jacobs/">Ian Jacobs</a>, W3C</li>
|
|
</ul>
|
|
|
|
<p>The editor would also like to thank the following people for their review of
|
|
the document:</p>
|
|
<ul>
|
|
<li>Joost Beintema</li>
|
|
<li><a href="http://www.w3.org/People/Bos/">Bert Bos</a>, W3C</li>
|
|
<li><a href="http://www.w3.org/People/Boyera/">Stephane Boyera</a>, W3C</li>
|
|
<li><a href="http://www.w3.org/People/D%c3%bcrst/">Martin J. Dürst</a>, W3C</li>
|
|
<li>Koen Holtman</li>
|
|
<li><a href="http://www.w3.org/People/Lafon/">Yves Lafon</a>, W3C</li>
|
|
<li>Paul Mansfield</li>
|
|
<li>Armin Obersteiner</li>
|
|
<li>Jim Studt</li>
|
|
<li>Timothy J. Wood</li>
|
|
<li>Erik Wilde</li>
|
|
</ul>
|
|
|
|
<h2><a name="references" id="references">References</a></h2>
|
|
|
|
<dl>
|
|
<dt id="CCPP">CC/PP</dt>
|
|
|
|
<dd><cite><a href="http://www.w3.org/1999/07/NOTE-CCPP-19990727/">"Composite
|
|
Capability/Preference Profiles (CC/PP): A user side
|
|
framework for content negotiation"</a></cite>, Franklin Reynolds, Johan
|
|
Hjelm, Spencer Dawkins, Sandeep Singhal, 27 July 1999. Available at
|
|
http://www.w3.org/1999/07/NOTE-CCPP-19990727/.</dd>
|
|
|
|
<dt id="ref-CHIPS">CHIPS</dt>
|
|
<dd><cite><a href="http://www.w3.org/TR/2003/NOTE-chips-20030128/">Common
|
|
<acronym title="Hypertext Transfer Protocol">HTTP</acronym> Implementation Problems</a></cite>,
|
|
Olivier Thereaux, 28 January 2003. Available at http://www.w3.org/TR/2003/NOTE-chips-20030128/.
|
|
Latest version available at http://www.w3.org/TR/chips.</dd>
|
|
|
|
<dt id="CSS2">CSS2</dt>
|
|
|
|
<dd><cite><a href="http://www.w3.org/TR/1998/REC-CSS2-19980512/">"Cascading
|
|
Style Sheets, Level 2"</a></cite>, Bert Bos, Håkon Wium
|
|
Lie, Chris Lilley, Ian Jacobs, 12 May 1998. Available at
|
|
http://www.w3.org/TR/1998/REC-CSS2-19980512/.</dd>
|
|
|
|
<dt id="DC">DC</dt>
|
|
|
|
<dd><cite><a href="http://www.dublincore.org/">Dublin Core</a></cite>. Available
|
|
at http://www.dublincore.org/.</dd>
|
|
|
|
<dt id="HTML401">HTML 4.01</dt>
|
|
|
|
<dd><cite><a href="http://www.w3.org/TR/1999/REC-html401-19991224/">"HTML
|
|
4.01 Specification"</a></cite>, Dave Raggett, Arnaud Le Hors, Ian Jacobs,
|
|
24 December 1999. Available at
|
|
http://www.w3.org/TR/1999/REC-html401-19991224/.</dd>
|
|
|
|
<dt id="PURL">PURL</dt>
|
|
|
|
<dd><cite><a href="http://purl.oclc.org/OCLC/PURL/INET96">"Introduction to
|
|
Persistent Uniform Resource Locators"</a></cite>, Keith Shafer, Stuart
|
|
Weibel, Erik Jul, Jon Fausey. Available at
|
|
http://purl.oclc.org/OCLC/PURL/INET96.</dd>
|
|
|
|
<dt id="RDF10">RDF</dt>
|
|
|
|
<dd><cite><a href="http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/">"Resource
|
|
Description Framework (RDF) Model and Syntax
|
|
Specification"</a></cite>, Ora Lassila, Ralph R. Swick, 22 February 1999.
|
|
Available at
|
|
http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/.</dd>
|
|
|
|
<dt id="RFC1630">RFC1630</dt>
|
|
|
|
<dd><cite><a href="http://www.ietf.org/rfc/rfc1630.txt">"Universal
|
|
Resource Identifiers in WWW"</a></cite>, T. Berners-Lee, June 1994.
|
|
Available at http://www.ietf.org/rfc/rfc1630.txt.</dd>
|
|
|
|
<dt id="RFC2119">RFC2119</dt>
|
|
<dd><cite><a href="http://www.ietf.org/rfc/rfc2119.txt">
|
|
|
|
"Key words for use in RFCs to Indicate Requirement Levels"</a>,
|
|
S. Bradner, March 1997. Available at
|
|
http://www.ietf.org/rfc/rfc2119.txt</cite>
|
|
</dd>
|
|
|
|
<dt id="RFC2396">RFC2396</dt>
|
|
|
|
<dd><cite><a href="http://www.ietf.org/rfc/rfc2396.txt">"Uniform Resource
|
|
Identifiers (URI): Generic Syntax"</a></cite>, T. Berners-Lee et al.,
|
|
August 1998. Available at http://www.ietf.org/rfc/rfc2396.txt.</dd>
|
|
|
|
<dt id="RFC2616">RFC2616</dt>
|
|
|
|
<dd><cite><a href="http://www.ietf.org/rfc/rfc2616.txt">"Hypertext
|
|
Transfer Protocol -- HTTP/1.1"</a></cite>, R. Fielding et al., June 1999.
|
|
Available at http://www.ietf.org/rfc/rfc2616.txt.</dd>
|
|
|
|
<dt id="RFC2617">RFC2617</dt>
|
|
|
|
<dd><cite><a href="http://www.ietf.org/rfc/rfc2617.txt">"HTTP
|
|
Authentication: Basic and Digest Access Authentication"</a></cite>,
|
|
J. Franks et al., June 1999. Available at
|
|
http://www.ietf.org/rfc/rfc2617.txt.</dd>
|
|
|
|
<dt id="RFC2717">RFC2717</dt>
|
|
|
|
<dd><cite><a href="http://www.ietf.org/rfc/rfc2717.txt">"Registration Procedures for URL Scheme Names"</a></cite>,
|
|
R. Petke et al., November 1999. Available at
|
|
http://www.ietf.org/rfc/rfc2717.txt.</dd>
|
|
|
|
<dt id="RURL">RURL</dt>
|
|
|
|
<dd><cite><a
|
|
href="http://www.ics.uci.edu/pub/ietf/http/draft-bos-http-redirect-00.txt">"Handling
|
|
of fragment identifiers in redirected URLs"</a></cite>, B. Bos, 30
|
|
June 1999. Available at
|
|
http://www.ics.uci.edu/pub/ietf/http/draft-bos-http-redirect-00.txt.</dd>
|
|
|
|
<dt id="SCHEMES">SCHEMES</dt>
|
|
|
|
<dd><cite><a
|
|
href="http://www.w3.org/Addressing/schemes">"An Index of WWW
|
|
Addressing Schemes"</a></cite>, Dan Connolly, 2000. Available at
|
|
http://www.w3.org/Addressing/schemes.</dd>
|
|
|
|
<dt id="SCHEMES-IANA">SCHEMES-IANA</dt>
|
|
|
|
<dd><cite><a
|
|
href="http://www.iana.org/assignments/uri-schemes">"Uniform Resource Identifier (URI) SCHEMES"</a></cite>, IANA. Available at
|
|
http://www.iana.org/assignments/uri-schemes.</dd>
|
|
|
|
<dt id="SELECTORS">SELECTORS</dt>
|
|
|
|
<dd><cite><a
|
|
href="http://www.w3.org/TR/2001/CR-css3-selectors-20011113/">"Selectors"</a></cite>, Daniel Glazman et al., 13 November 2001. Available at
|
|
http://www.w3.org/TR/2001/CR-css3-selectors-20011113/.</dd>
|
|
|
|
<dt id="UAAG10">UAAG10</dt>
|
|
|
|
<dd><cite><a href="http://www.w3.org/TR/2002/REC-UAAG10-20021217/">"User
|
|
Agent Accessibility Guidelines 1.0"</a></cite>, Jon Gunderson, Ian Jacobs,
|
|
17 December 2002. Available at
|
|
http://www.w3.org/TR/2002/REC-UAAG10-20021217/.</dd>
|
|
|
|
<dt id="UAWP">UAWP</dt>
|
|
|
|
<dd><cite><a href="http://www.w3.org/DesignIssues/UserAgent">"Axioms of
|
|
Web architecture: User Agent watch points"</a></cite>, Tim Berners-Lee,
|
|
1998. Available at http://www.w3.org/DesignIssues/UserAgent.</dd>
|
|
|
|
<dt id="XML-STYLE">XML-STYLE</dt>
|
|
|
|
<dd><cite><a
|
|
href="http://www.w3.org/1999/06/REC-xml-stylesheet-19990629/">"Associating
|
|
Style Sheets with XML documents Version 1.0"</a></cite>, James
|
|
Clark, 29 June 1999. Available at
|
|
http://www.w3.org/1999/06/REC-xml-stylesheet-19990629/.</dd>
|
|
</dl>
|
|
</body>
|
|
</html>
|