How does it work?
The URI resolver just parses the URI to get the parts, then uses registries and external queries to retrieve information about MIME types, top-level domains and so forth. This data is taken from IANA and Wikidata and is periodically updated.
The URIs on this site are in the format:
<type> is one of
<identifier> is necessary only for
# and the usual invalid characters.
Resolving a URI will invoke content negotiation to pick on of Turtle, RDF/XML, JSON-LD or HTML and a 303 redirect to the relevant document. Each URI has an associated set of documents: ttl, rdf, jsonld, nt, html. These have URLs in the following formats:
http://purl.org/uri4uri/uri/http://xkcd.com/123/ - URI for "http://xkcd.com/123/"
http://purl.org/uri4uri/host/totl.net - URI for the domain "totl.net"
http://purl.org/uri4uri/suffix/pdf - URI for the suffix ".pdf"
http://purl.org/uri4uri/scheme/ftp - URI for the URI scheme "ftp"
http://purl.org/uri4uri/mime/text/plain - URI for the MIME Type "text/plain"
http://purl.org/uri4uri/urn/uuid - URI for the "urn:uuid:" Namespace
http://purl.org/uri4uri/well-known/void - URI for the "/.well-known/void" Service
http://purl.org/uri4uri/port/80 - URI for the port 80
http://purl.org/uri4uri/protocol/tcp - URI for the TCP protocol
How big is it?
Virtually infinite, and still growing! Since it generates most results on the fly however, the size can be pretty efficiently compressed to almost 0. The remainder are the registries from IANA, which are cached and take about 2.5 MiB of space in total.
What is included
URIs, Internet Domains, Mime Types, File Suffixes, URI Schemes, URN Namespaces, Well-Known URIs, Ports, Protocols.
How do I find the URI4URI which identifies the URL of a page I'm viewing?
What parts of a URI are supported?
The majority of the effort has gone into calculating the components of http and https URIs. An example showing off all the parts of a URI would be http://foo:firstname.lastname@example.org:80/index.html?a=1&b=2#fragment, however other URI schemes are supported, e.g. tel: or secondlife:.
Sir Professor TimBL has said to you "Cool URIs don't change". This implies a sad corollary; "Uncool URIs do sometimes change". You may use the uri4uri URIs to describe your own metadata about a URI, including where, why and by whom it was assigned, and what it was the sameAs at a given moment or interval throughout its existence.
Can I see the source code?
Sure, you can find the uri4uri source on github.com