Podcast
Questions and Answers
What does the authority component of a URI consist of?
What does the authority component of a URI consist of?
What is the purpose of the query component in a URI?
What is the purpose of the query component in a URI?
In which order are the URI components typically listed?
In which order are the URI components typically listed?
What character indicates the beginning of the query section in a URI?
What character indicates the beginning of the query section in a URI?
Signup and view all the answers
What must a path component do if an authority is present in the URI?
What must a path component do if an authority is present in the URI?
Signup and view all the answers
What is a URI scheme responsible for defining?
What is a URI scheme responsible for defining?
Signup and view all the answers
What does the fragment identifier in a URI refer to?
What does the fragment identifier in a URI refer to?
Signup and view all the answers
What syntax should a path follow when there is no authority in a URI?
What syntax should a path follow when there is no authority in a URI?
Signup and view all the answers
What defines a Uniform Resource Identifier (URI)?
What defines a Uniform Resource Identifier (URI)?
Signup and view all the answers
Which of the following components of a URI can include a fragment identifier?
Which of the following components of a URI can include a fragment identifier?
Signup and view all the answers
How are URI schemes and hosts treated regarding case sensitivity?
How are URI schemes and hosts treated regarding case sensitivity?
Signup and view all the answers
What is the purpose of percent-encoding in a URI?
What is the purpose of percent-encoding in a URI?
Signup and view all the answers
Which statement is true regarding URI comparison?
Which statement is true regarding URI comparison?
Signup and view all the answers
What is an Internationalized Resource Identifier (IRI)?
What is an Internationalized Resource Identifier (IRI)?
Signup and view all the answers
In the context of relative references, what does resolution of a URI involve?
In the context of relative references, what does resolution of a URI involve?
Signup and view all the answers
What is a valid structure of a complete URI?
What is a valid structure of a complete URI?
Signup and view all the answers
Which of the following characters is considered a reserved character in URIs?
Which of the following characters is considered a reserved character in URIs?
Signup and view all the answers
How is percent-encoding represented in a URI?
How is percent-encoding represented in a URI?
Signup and view all the answers
Which of these URI examples contains a percent-encoded space character?
Which of these URI examples contains a percent-encoded space character?
Signup and view all the answers
What component of a URI typically represents a fragment identifier?
What component of a URI typically represents a fragment identifier?
Signup and view all the answers
In URI comparison, what determines if two URIs are equivalent?
In URI comparison, what determines if two URIs are equivalent?
Signup and view all the answers
Which of the following describes a relative URI reference?
Which of the following describes a relative URI reference?
Signup and view all the answers
What does the syntax of a URI include for hierarchical organization?
What does the syntax of a URI include for hierarchical organization?
Signup and view all the answers
Flashcards
What is the scheme in a URI?
What is the scheme in a URI?
The scheme identifies the type of URI, e.g., "http", "https", "ftp", "mailto".
What is the hier-part in a URI?
What is the hier-part in a URI?
The hier-part includes the authority (if any) followed by the path, indicating the location of the resource within the authority.
What is the authority in a URI?
What is the authority in a URI?
It specifies the host (like a website's domain name, e.g., "example.com") and optionally, the user information (username and password) and the port number.
What is the path in a URI?
What is the path in a URI?
Signup and view all the flashcards
What is the query in a URI?
What is the query in a URI?
Signup and view all the flashcards
What is the fragment in a URI?
What is the fragment in a URI?
Signup and view all the flashcards
What is a default port used for in a URI?
What is a default port used for in a URI?
Signup and view all the flashcards
What does the query component in a URI represent?
What does the query component in a URI represent?
Signup and view all the flashcards
Uniform Resource Identifier (URI)
Uniform Resource Identifier (URI)
Signup and view all the flashcards
Uniform Resource Locator (URL)
Uniform Resource Locator (URL)
Signup and view all the flashcards
Relative Reference Resolution
Relative Reference Resolution
Signup and view all the flashcards
Absolute URL
Absolute URL
Signup and view all the flashcards
URI Comparison
URI Comparison
Signup and view all the flashcards
Normalization
Normalization
Signup and view all the flashcards
Reserved Characters
Reserved Characters
Signup and view all the flashcards
Unreserved Characters
Unreserved Characters
Signup and view all the flashcards
What is a URI?
What is a URI?
Signup and view all the flashcards
How are URIs structured?
How are URIs structured?
Signup and view all the flashcards
What are reserved characters in URIs?
What are reserved characters in URIs?
Signup and view all the flashcards
What are unreserved characters in URIs?
What are unreserved characters in URIs?
Signup and view all the flashcards
What is percent-encoding?
What is percent-encoding?
Signup and view all the flashcards
How does percent-encoding work practically?
How does percent-encoding work practically?
Signup and view all the flashcards
Are hex digits case-sensitive?
Are hex digits case-sensitive?
Signup and view all the flashcards
What character encoding is used for URIs?
What character encoding is used for URIs?
Signup and view all the flashcards
Study Notes
Uniform Resource Identifier (URI)
- A compact sequence of characters identifying an abstract or physical resource.
- A resource isn't necessarily available on the web.
- URIs can be assigned to real-world objects or concepts.
- Current standard: RFC 3986, published in January 2005.
- The standard was developed by Tim Berners-Lee, Roy Fielding, and Larry Masinter.
- The URI is on the website: https://www.rfc-editor.org/rfc/rfc3986
URI (1)
- Each URI starts with a scheme name followed by a colon (:) and then the scheme-specific part.
- Scheme specifications define scheme-specific syntax within certain limits.
- The Internet Assigned Numbers Authority (IANA) is responsible for administering URI schemes.
- The IANA website is: https://www.iana.org/
Well-Known URI Schemes
- file: Defined in RFC 8089 (February 2017)
- http/https: Defined in RFC 9110 (June 2022)
- mailto: Defined in RFC 6068 (October 2010)
- about: Defined in RFC 6694 (August 2012)
Dereferencing
- Accessing a resource identified by a URI.
- In most cases, "access" means retrieving a representation of the resource.
URL vs URN (1)
- Uniform Resource Locator (URL): Identifies resources by their location.
- RFC 1738 (December 1994) defines URLs
- Uniform Resource Name (URN): Persistent and location-independent resource identifiers.
- RFC 2141 (May 1997) defines URN syntax
URL vs URN (2)
- The distinction between URLs and URNs is now obsolete.
- RFC 3305 (August 2002) clarifies URIs, URLs, and URNs and provides recommendations.
URL vs URN (3)
- A URI can be a locator, a name, or both.
- URI schemes don't need to be categorized as URL or URN.
- A URL formally identifies resources through a representation of their access mechanism (location).
URN
- A Uniform Resource Name (URN) is a persistent, location-independent identifier.
- A URN is a URI that's assigned under the urn URI scheme.
- See RFC 8141 (April 2017) for more details.
WHATWG Standard (1)
- The WHATWG URL Living Standard aims to align RFC 3986 and RFC 3987 with contemporary implementations.
- It also aims to standardize the term "URL" and enhance the URL's existing JavaScript API.
- The URL Living Standard is available at https://url.spec.whatwg.org/
WHATWG Standard (2)
- WHATWG aims for uniform handling of URIs and IRIs (Internationalized Resource Identifiers).
- It recognizes a URL as a universal identifier.
URI vs URL (IETF vs WHATWG)
- Various blog posts by Daniel Stenberg discuss the differences between URIs and URLs, as well as other topics.
URI Examples
- A collection of various URI examples is provided.
URI Characters (1)
- Specific characters are reserved for use in URIs.
- Other characters are unreserved.
URI Characters (2)
- Percent-encoding is employed to represent data octets when their corresponding characters are not allowed or are used as delimiters.
- Percent-encoded data uses the % followed by two hexadecimal characters.
URI Characters (3)
- Examples of percent-encoding are given.
URI Syntax (1)
- URI syntax is hierarchically organized, with components listed in decreasing significance (left to right).
- Common syntax components include scheme, hier-part, and fragment components.
URI Syntax (2)
- Examples of URI syntax are shown, including the respective scheme, host, path, query, and fragment components for each example.
URI Syntax (3)
- In 2009, Tim Berners-Lee expressed regret for including double slashes in URIs, while acknowledging it seemed like a good idea at the time.
Authority
- The authority component specifies the jurisdiction of the remainder of the URI.
- Syntax: [userinfo '@'] host [' : ' port]
Path
- A sequence of path segments separated by slashes.
- The beginning and end components of path syntax can be empty or begin with a "/" character.
- Special path components like '.' and '..' have their predefined meanings and are useful to navigate file system structures.
Query
- The query component is indicated by the "?" character, followed by name/value pairs delimited by an "&."
- Name/value pairs are used to convey non-hierarchical data, like input values to describe forms.
Fragment Identifier (1)
- A fragment identifier is indicated by a "#" symbol and is used to identify a specific part within the primary resource.
- It can also convey additional information about that portion of the resource.
Fragment Identifier (2)
- Scheme specifications often do not include directives on fragment identifiers.
- Fragment identifiers are considered independent from the definition of the scheme.
Meaning of the Fragment Identifier (1)
- For HTML resources, fragment identifiers refer to specific parts within the document or provide state information for in-page scripts.
Meaning of the Fragment Identifier (2)
- Application/xml, text/xml, and /*+xml media types use the fragment identifiers based on the XPointer Framework (W3C Recommendation, 2003).
Absolute URI, URI-reference, relative reference
- An 'Absolute URI' does not contain a fragment identifier.
- A URI-Reference might have a fragment component.
- A 'relative reference' is a scheme specific subpart of a URI.
URI-reference Examples
- Various URI-reference examples are provided.
Same-document reference
- A URI reference specifies a URI identical except for fragment component to the base URI.
- Dereferencing such a reference should not cause any new retrieval actions.
Establishing a Base URI
- Base URI for relative references can be embedded within the media content.
- For XML, base URI is specified through the XML:base attribute.
- For HTML, a base element supplies a base URI.
- If there isn't a base URI and the URI reference is encapsulated within another entity, the base URI is the base URI of the encompassing entity. Otherwise, the base URI depends on the application.
Relative Reference Resolution Examples (1 & 2)
- Examples of relative reference resolution are shown based on a given base URI.
Relative Reference Resolution Examples (3)
- Detailed example of resolving relative references within an HTML document.
URI Comparison (1)
- Scheme and host components of URI are case-insensitive, other components (typically) are case-sensitive unless otherwise defined.
URI Comparison (2)
- A possible definition of URI equivalence is when both identify the same resource; practically, URIs are compared as strings (after normalization).
JavaScript API
- The WHATWG URL Living Standard defines a JavaScript API for operating with and manipulating URLs.
- There are examples provided of how to use JavaScript for handling URL properties and operations.
Internationalized Resource Identifier (IRI) (1)
- IRIs are built using Unicode/UCS characters, not just ASCII characters.
- IRI components and reserved characters are managed based on the standards of the URI specification.
Internationalized Resource Identifier (IRI) (2)
- Examples of IRIs are shown.
Internationalized Resource Identifier (IRI) (3)
- IRIs can be mapped to equivalent URIs, one character at a time.
- Conversion to and from octets employing UTF-8 and %HH hexadecimal notation is described.
Internationalized Resource Identifier (IRI) (4)
- Advantages of using IRIs include improved usability for non-Latin-based languages.
- A potential risk of homograph attacks is detailed, where similar-looking characters might lead to unintended resource access.
XML Base (1)
- The XML Base recommendation (W3C, 2009) establishes base URIs within XML documents through the xml:base attribute.
- This approach handles relative references within the XML documents.
XML Base (2)
- Example demonstrated showing how the xml:base attribute affects the resolution of relative references within XML documents.
URL Shortening (1)
- Long URLs can be shortened using HTTP redirection.
- The utility of URL shortening lies in creating more aesthetic and compact identifiers to resources.
- Originally, Twitter messages had a limitation of 140 characters.
URL Shortening (2)
- A list of URL-shortening services/APIs (e.g., GitHub, Twitter, Wikipedia, TinyURL, Bitly) is presented.
URL Shortening: TinyURL & Bitly (Info)
- Detailed information on TinyURL and Bitly URL-shortening services is given, including the service provider, web page, HTTP status code, registration, URL provision, tracking, and API access information.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
This quiz tests your knowledge about Uniform Resource Identifiers (URIs), focusing on their components like scheme, authority, and query. You'll learn how these parts work together to form a complete URI, including aspects like percent-encoding and case sensitivity. Challenge yourself with questions on the structure and function of URIs!