Junior
218
What is the difference between URI and URL?
Answer from AI
sobes.tech AI
URI (Uniform Resource Identifier) — is a generalized syntax for identifying a resource. URL (Uniform Resource Locator) — is a specific type of URI that indicates the location of a resource and how to access it. URN (Uniform Resource Name) — is also a specific type of URI that identifies a resource by name within a namespace but does not specify its location.
All URLs are URIs, but not all URIs are URLs.
-
Example of URI:
https://www.example.com/page(this is also a URL)urn:isbn:0-486-27557-4(this is a URN)
-
Example of URL:
https://www.example.com/pageftp://user:password@ftp.example.com/resource
| Aspect | URI | URL |
|---|---|---|
| Purpose | Resource identification | Resource identification and location indication |
| Type | General identifier | Subtype of URI, locator |
| Contains | Identifier (name or location) | Identifier + protocol + location |
| Examples | https://example.com, urn:isbn:.. |
https://example.com, ftp://example.com |