4 ms·
URL or URI?
- detaro 6y agoBrowser makers have a clear opinion on this: > Standardize on the term URL. URI and IRI are just confusing. In practice a single algorithm is used for both so keeping them distinct is not helping anyone. https://url.spec.whatwg.org/#goals https://url.spec.whatwg.org/#goals And while not everything in their URL spec is universally applicable, that's probably one of the good points. Nowadays, if people mean or want to allow URNs (quite rare), they'll generally explicitly specify it instead of relying on the URI term.
- zzo38computer 6y agoURL and URI are different things (like the linked document mentions). Often, URL is what is meant, so write "URL". But, in some cases (such as for namespacing), URI is what is meant. My own opinion is, write URL if it is meant to access or reference a file or service or something, or URI if it is only an identifier for a namespace or something like that (i.e. if what it points to (if anything) is generally irrelevant). Usually, URL is correct (even though it is a URI too). However, a domain name is not a URL (nor a URI); it is only a part of one. (Also, some people say that if you want purely identifiers, to use UUIDs instead of URIs. But, a UUID is a URI, too! Prefix "urn:uuid:" in front to make a UUID into a URI.)