当前位置:网站首页>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
边栏推荐
- ACM study book introduction
- PEG-PEI共聚物/DNA复合物|甘草次酸修饰的长循环阳离子脂质体DNA复合物|解析说明
- ESP8266-Arduino programming example-I2C device address scan
- Summary of scratch learning related materials
- 华为云14天鸿蒙设备开发-Day9网络应用开发
- HMS Core音频编辑服务音源分离与空间音频渲染,助力快速进入3D音频的世界
- 安全浏览器将拥有这些隐藏功能,让你玩转浏览器
- 【AutoSAR 十三 NVM】
- About the choice of x86, x64, x86_64, ARM 64, ARM 32 when installing software
- m10
猜你喜欢
![[数学]线性代数复习总结](/img/21/daebbfc5b4fe99046eaded673f76a7.png)
[数学]线性代数复习总结

【目标检测】Generalized Focal Loss V2

尿素偶联Urea-siRNA Conjugates|Cyclodextrin-siRNA-β-CD环糊精修饰RNA核酸(解析说明)

小学弟问:程序员的工作是不是每天都是敲一天的代码呢?

EasyExce template filling generation of Excel of actual operation, many processing sheet page

JUC Concurrent Programming Basics AQS

cpolar应用实例之助力航运客户远程办公

并发编程学习笔记 之 常用并发容器的概念及使用方法

R语言对airbnb数据nlp文本挖掘、地理、词云可视化、回归GAM模型、交叉验证分析

webUI测试框架设计思路详解
随机推荐
RNA修饰技术介绍|介孔二氧化硅纳米颗粒(MSN)搭载的微小RNA-24(miR-24)纳米载体复合物
Build your own image search system (1): 10 lines of code to search images by image
并发编程学习笔记 之 常用并发容器的概念及使用方法
LeetCode #88.合并两个有序数组
全排列的一点小技巧:康托展开
聚丙烯微孔膜的等离子体改性及DNA|有机自由基改性DNA-阳离子脂质复合体的应用
[数学基础]线性代数相关概念学习
Samba服务器配置(什么情况下需要服务器)
GNOME将在Secure Boot被禁用时向用户发出警告 并准备提供安全帮助
ACM学习书籍简介
scratch 编程 + 小学数学
【Autosar vLinkGen 链接器脚本生成器】
include用法及搭配(include相关短语)
In the past six months, I have done those things about the automatic return of the transaction link...
敏捷组织 | 企业克服数字化浪潮冲击的路径
siRNA-S-S-PEG-LMWP|M-MSN-siRNA介孔二氧化硅修饰RNA(齐岳RNA功能化修饰)
荧光量子点修饰siRNA-QDs|纳米金修饰siRNA-Au(RNA修饰方式方法)
【AutoSAR 十 IO架构】
尿素偶联Urea-siRNA Conjugates|Cyclodextrin-siRNA-β-CD环糊精修饰RNA核酸(解析说明)
GalNAc-siRNA甘露糖/半乳糖修饰脱氧核糖核酸|siRNA-S-S-DSPE(RNA修饰技术介绍)