Background: Hash versus 303 redirection method

From pro-iBiosphere Wiki
Jump to: navigation, search

For details see Sauermann & Cyganiak 2008, Cool URIs for the Semantic Web. Here very brief:

The semantic web and linked data talk about things or concepts by means of web pages. Although seemingly esoteric, to be logically clear we need to have two different URIs for the thing and the web page. If we have Paris itself with the URI "http://example.org/Paris.itself, a human readable http://example.org/Paris.html and a data http://example.org/Paris.rdf, we can say that:

http://example.org/Paris.itself created 4500–4200 BC
http://example.org/Paris.html created 2001-03-28
http://example.org/Paris.rdf created 2013-01-12

For clarity it recommended to never return data under e.g. http://example.org/Paris.itself, but always under a different URI. Two methods exist:

1. 303 redirection: http://example.org/Paris is the abstract city itself, which on dereferencing is redirected with a http status 303 (see also) to http://example.org/Paris.rdf (content negotiation, user agent requests rdf data).

2. Hash method: http://example.org/Paris#city is the abstract city itself, which on dereferencing automatically returns http://example.org/Paris (content negotiation, user agent requests rdf data).

Differences: 303 method has "cleaner" URIs, but every request for information requires two http requests. The issue is less about data transfer but about latency or requests. Hash method may look more confusing, but returns data in a single request.