Why does the URI have a local file followed by three slashes, HTTP, and so on with two slashes?

Source: Internet
Author: User
That's going to look at the structure of uri[1].
scheme:[//[user:[email protected]]host[:port]][/]path[?query][#fragment]
As you can see, if there is a host, the front is to add//, so for HTTP and other network addresses in terms of
http://www.baidu.sb:80/ad/cash
It's natural to write like this.
So what if it's a file? File because there is no host ah, so the middle part is not, then it becomes
file:///ad/cash
For the document, it seems that//do not have any relationship
In fact, according to the above definition, the following is correct. Because if there is no host, the first [] content should not exist ah.
file:/ad/cash
This unified writing also has a standard, called curie[2].

In fact, the beginning of the/also can not be, just to see if you are the absolute address, is generally used absolute address.

Jong Teng
Links: https://www.zhihu.com/question/37063799/answer/70242462
Source: Know
Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.

Why does the URI have a local file followed by three slashes, HTTP, and so on with two slashes?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.