Uniform Resource Somethings
From Helpful
| For more webdev-related articles, see the webdev category. Among the more interesting are general webdev notes, Javascript related notes, CSS notes, browser peculiarities, jQuery |
| These are primarily notes This is probably not going to be complete in any real sense, and exists to contain bits of useful information. |
(Note these are sometimes misnamed Universal resource somethings.)
Contents |
Basic concepts
Overview
Uniform Resource Locators (URLs) specify where to locate something, which also implies its availability.
Uniform Resource Names (URNs) are usually identifiers or names of concepts or content ('what' instead of 'where'), namespaced using schemes, for example isbn: to identify books. URNs may be prefixed with urn: to clarify an URN is being used, although this is not considered part of the URN itself.
Uniform Resource Identifiers (URIs) encompass the two: An URI may be an URN, an URL, or contain both.
On the web, most URIs are specifically URLs. There is few real-world contexts where both URLs and URNs are used in the same place.
See also
- RFC 3986: Uniform Resource Identifiers (URI) (updates: RFC 1738, obsoletes: RFC 1808, RFC 2396, RFC 2732)
- RFC 2141: Uniform Resource Names (URN)
- RFC 3406: Uniform Resource Names (URN) Namespace Definition Mechanisms
- RFC 1738: Uniform Resource Locators (URL)
And also:
- RFC 3987: Internationalized Resource Identifier (IRI) generalizes URIs for Unicode, and defines a mapping from IRI to URI syntax.
- PURL usually refers to URLs that redirect to and are more persistent than the end content, rather like e.g. DOI.
In practice
URL length
URL length is considered limited in HTTP requests, partially to avoid DoS attacks (since request denial likely comes after the URL is received).
Usually, sending too large a URL in a HTTP request results in a "413 Entity Too Large" error.
Notes on standards and real-world implementations:
- RFC 2616 (HTTP 1.1) does not specify an upper limit. It does mention that some old (proxy) software might not support lengths above 255, though this is probably a very cautious estimate.
- In Internet Explorer, URIs can be no longer than 2083 characters (of which at most 2048 can be the path).
- Mozilla and most other browsers tend to have high (or no apparent) limits, or more specifically, higher than various server configurations (verify)
- Servers may fail at something like 4kB, 8kB (8190 for Apache), 16kB (documented for IIS), 32kB.
- server/framework constraints may impose limits, which are sometimes configurable, and also regularly not.
You can generally assume 2K, which is high enough for most useful things. However, if you actually want to know about these limits, you should probably first know why you are not POSTing the data instead.
URI parsing, escaping, and some related concepts
See Escaping_and_delimiting_notes#URI_parsing.2C_escaping.2C_and_some_related_concepts

