Frequently Asked Questions
What are the components of a URL?
A URL (Uniform Resource Locator) consists of several parts: the protocol/scheme (https://), an optional username and password, the hostname (example.com), an optional port (:8080), the path (/api/users), an optional query string (?page=1&limit=10), and an optional fragment (#results). Not all components are required in every URL.
What is a query string?
A query string is the part of a URL after the ? character, consisting of key=value pairs separated by &. For example, in https://example.com/search?q=hello&page=2, the query string is q=hello&page=2 with two parameters. Query strings pass data to the server or client without changing the URL path.
What is a URL fragment?
A URL fragment (also called a hash) is the part after the # character, such as #results in https://example.com/docs#results. Fragments are not sent to the server — they are handled by the browser to navigate to a specific section of the page. In single-page applications (SPAs), fragments are also used for client-side routing.