当前位置:网站首页>The difference between uri and url is simple to understand (what is the difference between uri and url)
The difference between uri and url is simple to understand (what is the difference between uri and url)
2022-07-29 20:56:00 【Full stack programmer webmaster】
Hello everyone, meet again, I'm your friend Quanstack Jun.
One, URI
<1>What is a URI
URI, Uniform Resource Identifier (URI), indicates that every available resource on the web, such as HTML documents, images, video clips, programs, etc., is identified by a URI.
<2>The structure of the URI
URI usually consists of three parts:
①Resource naming mechanism;
②The host name where the resource is stored;
③The name of the resource itself.
(Note: This is just the naming method of general URI resources. As long as the resource can be uniquely identified, it is called URI. The above three together are sufficient and unnecessary conditions for URI)
<3>URI example
For example: https://blog.csdn.net/qq_32595453/article/details/79516787
We can interpret it this way:
①This is a resource that can be accessed through https protocol,
②Located on the host blog.csdn.net,
③The resource can be uniquely identified by "/qq_32595453/article/details/79516787" (note that this is not necessarily a complete path)
Note: The above three points are just an explanation of the example. The above three points are not necessary conditions for URI. URI is just a concept. It doesn't matter how it is implemented, as long as it uniquely identifies a resource.
Second, URL
URL is a subset of URI.It is the abbreviation of Uniform Resource Locator, translated as "Uniform Resource Locator".
In layman's terms, URL is a string describing information resources on the Internet, mainly used in various WWW client programs and server programs.
Using URL can use a unified format to describe various information resources, including files, server addresses and directories.A URL is an implementation of the URI concept.
The general format of URL is (with square brackets [] is optional):
protocol ://hostname[:port] / path / [;parameters][?query]#fragment
The format of the URL consists of three parts:
①The first part is the protocol (or service mode).
②The second part is the IP address of the host where the resource is stored (sometimes also includes the port number).
③The third part is the specific address of the host resource, such as directory and file name.
The first and second parts are separated by a "://" symbol,
The second and third parts are separated by a "/" symbol.
Parts 1 and 2 are indispensable, and part 3 can sometimes be omitted.
The difference between URI and URL
From the above example, you may think that URI and URL may be the same concept, but it is not. Both URI and URL define what a resource is, but URL also defines how to access the resource.A URL is a specific URI, which is a subset of URIs that not only uniquely identifies a resource, but also provides information for locating that resource.URI is a semantic abstraction, which can be absolute or relative, while URL must provide enough information to locate, it is absolute.
———————————————–
Update: After reading everyone's questions, in fact, everyone can think that the uri is just a unique identification number, similar to your ID number, and the url is the ID address + name, so is it obvious~~
Update 2: In response to the questions of most students, what is actually tangled is what a URI is, why is it a URI and not a URL, in fact, it has been explained in the article, as long as it can uniquely identify a resource is the URI, the basis of the URIThe way to access its resources is given by the URL. This is the simplest summary. I hope it will be helpful to everyone. Good luck~~
Publisher: Full-stack programmer, please indicate the source: https://javaforall.cn/129577.htmlOriginal link: https://javaforall.cn
边栏推荐
- 磁性层状双金属氢氧化物和酶-DNA复合物|聚乙烯亚胺-DNA复合物(PEI/DNA)|作用机理
- ds1302——斌哥51
- es6语法使用默认参数和解构
- EasyExce template filling generation of Excel of actual operation, many processing sheet page
- Monitoring basic resources through observation cloud monitor, automatic alarm
- SAG1-MIC8复合DNA基因疫苗|新型脂质-HAP-DNA复合体|实验要求
- 使用MD5加密后的字符串存密码安全吗?你不得不了解的Hash算法
- 4D Summary: 38 Knowledge Points of Distributed Systems
- 【AutoSAR 八 OS】
- internship:利用easypoi将excel表数据导入导出
猜你喜欢

JUC并发编程基础AQS

Agile Organization | The path for enterprises to overcome the impact of the digital wave

【目标检测】Generalized Focal Loss V2
【AutoSAR 五 方法论】

单核浏览器和双核浏览器有什么区别,哪个好用?

【AutoSAR 十一 通信相关机制】

使用MD5加密后的字符串存密码安全吗?你不得不了解的Hash算法

【AutoSAR 四 BSW概述】

使用IDEA连接mysql

PEG-siRNA-PCL|siRNA-PEG-LHRH|MPEG-siRNA 甲氧基聚乙二醇修饰核酸
随机推荐
Kubernetes:(四)常用命令
ESP8266-Arduino编程实例-I2C设备地址扫描
About the choice of x86, x64, x86_64, ARM 64, ARM 32 when installing software
ESP8266-Arduino programming example-LittleFS and data upload
数据可视化----网页显示温湿度
藻酸盐/PEI/DNA复合载体|脂质-鱼精蛋白-DNA复合物|合成方法
conda虚拟环境 | install 与 list 问题
C language learning books (improvement)
Verilog的时间格式系统任务----$printtimescale、$timeformat
【AutoSAR 十一 通信相关机制】
JMeter usage tutorial (2)
用 Array.every & Array.some 匹配全部/部分内容 es6
模拟量、数字量与开关量的区别
Common power symbols meaning sharing
scratch 编程 + 小学数学
ESP8266-Arduino编程实例-LittleFS及数据上传
华为云14天鸿蒙设备开发-Day9网络应用开发
LeetCode_474_ one and zero
Chrome——插件推荐
朴素贝叶斯“朴素”在哪里?