当前位置:网站首页>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 .
边栏推荐
猜你喜欢

Ambire 钱包开启 Twitter Spaces 系列

Basic commands of redis' five basic data types

正版Adobe软件来了!Adobe全球唯一正版全家桶订阅只需0元/年

Wechat campus second-hand book trading applet graduation design finished product (5) assignment

"The time of a takeaway is not as valuable as that of a programmer": treat yourself as a person after reading a book? Power on

7、学习MySQL 选择数据库

妙用cURL

基于ROS的导航框架

UE4引擎的CopyTexture, CopyToResolveTarget

Electronic bidding procurement mall system: optimize traditional procurement business and speed up enterprise digital upgrading
随机推荐
NFT Insider #67:巴塞罗那足球俱乐部推出首个NFT作品,迪拜推出国家元宇宙战略
妙用cURL
直播实录 | 37 手游如何用 StarRocks 实现用户画像分析
Understanding service governance in distributed development
93. (leaflet chapter) leaflet situation plotting - modification of attack direction
局域网SDN硬核技术内幕 22 亢龙有悔——规格与限制(下)
最新版Ontrack EasyRecovery电脑数据恢复软件应用
避错,常见Appium相关问题及解决方案
Redis——JedisConnectionException Could not get a resource from the pool
电子招标采购商城系统:优化传统采购业务,提速企业数字化升级
小程序毕设作品之微信校园二手书交易小程序毕业设计成品(1)开发概要
小程序毕设作品之微信酒店预订小程序毕业设计(5)任务书
小程序毕设作品之微信校园二手书交易小程序毕业设计成品(8)毕业设计论文模板
Redis五大基本数据类型的基本命令
第一篇sourcetree安装
Basic commands of redis' five basic data types
Draw a wave ball with the curve of flutter and Bessel
Uniapp switches the tab bar to display different pages, remembers the page location and pulls up to get new data
我是如何在一周内拿到4份offer的?
7、学习MySQL 选择数据库