当前位置:网站首页>Interpretation of URL structure
Interpretation of URL structure
2022-07-23 07:41:00 【TW3lv3】
URL(Uniform Resource Locator) Uniform resource locator , It is composed of a string of simple text characters . A standard URL Corresponding to a specific resource of the server ( Such as HTML page , A picture, etc ).
Scheme: | // | Login:[email protected] | Address | :port | /path/to/resource | ?query_string | #fragment |
According to the complete URL Structure definition of , Divided into the above 8 Parts of , Each part has certain characteristics , And some parts are necessary , Some are optional . The definition of standards is quite different from the implementation of these standards by browsers .
Scheme part : The partial .
The protocol name consists of a string Case insensitive letters form , With : As an end sign . The protocol represents the protocol that needs to be used to obtain the resource . Such as HTTP、HTTPS etc. . The browser will support some additional protocols , Such as data: and javascript: etc. .
// part : Hierarchy URL Signs
Basically every URL Will contain this symbol , Is constant ; It can be understood as a symbol that separates the protocol from the following information . Follow the instructions in the book , One advantage is Web Applications do not need to pay attention to the specific implementation of a protocol , Just focus on ’//’ Just point to the address after the symbol .
But there are also non hierarchical URL: for example ,mailto: agreement . When using
mailto:[email protected]?.... When , The URL Will be able to deliver to the default mail client without additional parsing .
Login:[email protected] part : Authentication
In fact, we see less of this piece of information , This is an optional part , General agreement (http\https And so on ) Will use the default anonymous form for data acquisition , This section uses @ As the closing symbol of this part .
Address part : Server address
This is a key part , It's about which server you need to get resources from . What we see more is that this part is based on domain names (htc.org) In the form of , And Ipv4(220.181.111.188) Address rendering for . Of course, it can also be Ipv6 In the form of .
According to the standard description, this part can only be used : Numbers 、“.”、“-” form . But the browser will support more characters .
Port part : Server port
Here is the network port ,16 position , Therefore, it can be [0~2^16), The port here is not a physical port , It's a logical port ; As long as it is for data transmission when processing multiple processes , Ensure that the data in each process will not be disordered , It can be transmitted to the set in the corresponding process ( Reference resources : port _ Baidu Encyclopedia )
Different network protocols have their own specific port numbers : Such as http 80
/path/to/resource: File path
aforementioned URL It points to a unique resource , This point is to the full path of the resource ( That is, the storage location ), It's usually used / Hierarchical description .
?query_string: Query string
The query string here is used to pass parameters to the server . But the standard does not have particularly strict provisions on this part . This part is based on ? Start as a sign , Now the general usage is similar to the following form ,?name=hello&id=5&… , And this usage is also called server-side language ( Such as PHP etc. ) Supported by the , Such as PHP The method to get the query value is :
$_GET['id']
$_POST['id']#fragment: fragment ID
This part is similar to the above ? The essential difference between the following form information is that this part of the content will not be delivered to the server . Generally used for page anchors . There is a button to return to the top in the lower right foot of our common website , It is generally implemented with .
边栏推荐
- 《postgresql指南--内幕探索》第三章查询处理
- 真人踩过的坑,告诉你避免自动化测试常犯的10个错误
- Understanding service governance in distributed development
- Get to know layer in fluent for the first time
- With 130 new services and functions a year, this storage "family bucket" has grown again
- tensorflow2.0稀疏矩阵输入操作
- LeetCode 757 设置交集大小至少为2[排序 贪心] HERODING的LeetCode之路
- 93.(leaflet篇)leaflet态势标绘-进攻方向修改
- 一年130+新服务和功能,这个存储“全家桶”又壮大了
- Ambire 钱包开启 Twitter Spaces 系列
猜你喜欢
![[ssm] unified result encapsulation](/img/ff/9528a062d464acee52047598af40c3.png)
[ssm] unified result encapsulation

小程序毕设作品之微信酒店预订小程序毕业设计(6)开题答辩PPT

VR panoramic zoo, a zoo business card with different achievements

【09】程序装载:“640K内存”真的不够用么?

Delete the duplicate items in the array (keep the last duplicate elements and ensure the original order of the array)

自定义View:悬浮球与加速球

uniapp切换tab栏显示不同页面并记住页面位置和上拉获取新数据

ES6 solves asynchronous problems

园区招商难在“哪”?产业园区招商引资困点难点问题盘点

Wechat campus second-hand book trading applet graduation design finished product (7) Interim inspection report
随机推荐
我是如何在一周内拿到4份offer的?
ETL工具(数据同步)
测试用例设计方法合集
Implementation of remove function
Redis五大基本数据类型的基本命令
避错,常见Appium相关问题及解决方案
Educational Codeforces Round 132 A - D
升级poi-tl版本1.12.0与旧版poi(4.1.2)、easyexcel之间的依赖冲突解决
Vector3.Lerp
直播实录 | 37 手游如何用 StarRocks 实现用户画像分析
第一篇sourcetree安装
【09】程序装载:“640K内存”真的不够用么?
Unity notes - use of addressables
Uniapp switches the tab bar to display different pages, remembers the page location and pulls up to get new data
船新 IDEA 2022.2 正式发布,新特性真香
JS determines the scrolling element and solves the tab to switch the scrolling position independently
局域网SDN硬核技术内幕 17 从一到百
现货白银走势图大致是怎么样变化的?
分析伦敦银的实时行行发展方法
Flutter memory leak detection