For a long time, I know very little about the information of the browser's address bar, only the domain name (I guess I don't know it is called). Alas... What a shame. In the software major has been mixed for two years, is a rookie. To be honest, sometimes I feel that there really is too much to learn in the field of computer, and the speed of development is so fast. However, this is already the fact that can not be changed, for I can only take the hard way forward, I believe there will be a successful day. I've been learning JavaScript for a while, and there's a little bit of knowledge about URLs. Then I looked up some other information, so I sorted it out:
Take the following URL as an example, to introduce the general URL of the various parts of the composition
Http://www.aspxfans.com:8080/news/index.asp?boardID=5&ID=24618&page=1#name
As you can see from the URL above, a complete URL includes the following sections:
1, the protocol part: the URL of the protocol part of "http:", which means that the Web page is using the HTTP protocol. There are a number of protocols available on the Internet, such as http,ftp, and the HTTP protocol is used in this example. "//" after "HTTP" as a separator
2, domain name part: The domain name part of the URL is "www.aspxfans.com". A URL, you can also use the IP address as the domain name
3, Port part: Following the domain name is the port, domain name and port between the use of ":" as a separator. The port is not a required part of a URL, and if the port part is omitted, the default port 80 is used
4, the virtual directory section: from the domain name after the first "/" start to the Last "/", is the virtual directory part. The virtual directory is also not a necessary part of a URL. The virtual directory in this example is "/news/"
5, filename section: From the domain name after the last "/" start to. "So far, is the filename part, if there is no"? ", is the file part, if not"? "from the Last"/"after the domain name. "and" # ", then from the last"/"to the end of the domain name, it is the filename part. In this example, the filename is "index.asp". The filename part is not a necessary part of a URL, and if omitted, the default filename is used
6, anchor part: from "#" start to the end, are the anchor part. The anchor part in this example is "name." The anchor part is not a necessary part of a URL
7, parameter part: from ". The section between the start and the # is part of the parameter, also known as the search section, the query section. The parameters in this example are "boardid=5&id=24618&page=1". A parameter can allow multiple parameters, with "&" as the separator between parameters and parameters.