SlashRedirection

From W3C Wiki
Revision as of 16:44, 17 July 2003 by SandroHawke (Talk)

Jump to: navigation, search

How do you make a SlashURI which doesn't have problems WhenBrowsableAndUnambiguousCollide?

Answer: Use HTTP Redirects.

Consider:


http://purl.org/dc/elements/1.1/title 


The server handling http://purl.org/ responds to all requests with an HTTP "302 Found" redirect. This redirect tells the browser to go instead to "http://dublincore.org/2003/03/24/dces#title". The first URI conceptually remains the URI of the dc:title property, the second URI is the URI of an authoritative document about that dc:title property.

The 303 See Other redirect may be more in keeping with the wording of RFC rfc:2616. Adminstrators at purl.org and xmlns.com have suggested a willingness to change if consensus on this point emerges. The idea here is that clients are asking for a represention of something and being told, "I don't have one, but I do have some information about it, over here...."

All known browsers (at least NS4, Mozilla 1.2, IE6, and Opera5) change the displayed URI to the second one, so the user has a fairly clear indication of the distinction between the thing and the page about the thing. (NS4 makes the user engage in an explicit See Other clickthrough with 303 redirects, but not with 302 Found.)

At the second URI, RDF and HTML may both be served (either with embedding or content negotiation) as long as:

  1. fragment identifiers (based at that new URI) are only used
  with one of the content-types, or
  1. the RDF is not served with a content-type
  with out-of-the-page fragment semantics

Drawbacks?

  • There is an extra HTTP roundtrip.
  • Redirects can be confusing to users.
  • Configuring a server to issue redirects can be difficult
 or impossible in some cases.   
  • Each public name requires an explicit step (setting up the
 redirect), which is more work than just using a term in a
 document published at a fixed location.  (A tool to create
 and .htaccess out of rdfs':Is'Defined'By links should be simple
 enough, but that still requires adding the Is'Defined'By and 
 thinking about what URIs you want to expose to the world.)