After Tim Berners-Lee invented the World Wide Web, HTML, HTTP and web servers, he decided to make life harder for future web programmers and came up with links, or URLs. URL stands for Universal Resource Locator.
A typical link is given by a template:
Some of the parts may be missing, but
hostalways be listed.
Protocolspecifies the name of the protocol by which the client and server will communicate. Typical protocol names: HTTP, HTTPS, FTP, SSH, ...
Hostis the name of the server on the network to send the request to. Initially it was an IP address, but people quickly came up with human-readable names (domain names) so as not to remember anything. As if remembering a couple of numbers is so difficult)
querywas thought of.
Pathspecified the location of the HTML file that the server was supposed to give to the client. However, after the web was taken over by amateurs, they quickly realized that HTML files could be dynamically created on the server side. Therefore, a section was added to the URL
query, in which a bunch of useful information can be passed to the server.
anchor, this is just a special label on an HTML page that tells the browser that the page should not only be displayed, but also scrolled to a certain place, that is, a label.
2.2 query & params
I'll tell you a little more about
The part of the link under the title
query starts immediately after the question mark and ends with a # (or the end of the link). The information in the query is a set of parameters in the following form:
The URL cannot contain spaces and a bunch of other characters, so all suspicious characters are escaped. Most likely, you often encountered this when you copied a link and threw it to a friend:
You can read more on this topic at the link .