当前位置:网站首页>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 .
边栏推荐
- 2022就业季惊喜来袭!正版Adobe软件,终于能正经白嫖一把了
- 一次 MySQL 误操作导致的事故,「高可用」都顶不住了
- (五)数电——公式化简法
- 程序员45岁之后,绝大部分都被淘汰吗?真相寒了众人的心
- 最新版Ontrack EasyRecovery电脑数据恢复软件应用
- Delete the duplicate items in the array (keep the last duplicate elements and ensure the original order of the array)
- VR panoramic zoo, a zoo business card with different achievements
- 工作流引擎在vivo营销自动化中的应用实践
- 小程序毕设作品之微信酒店预订小程序毕业设计(5)任务书
- 对比学习下的跨模态语义对齐是最优的吗?---自适应稀疏化注意力对齐机制 IEEE Trans. MultiMedia
猜你喜欢

Daily question brushing record (XXXI)

信息系统项目管理师必背核心考点(四十九)合同法

Ambire 钱包开启 Twitter Spaces 系列

Understand the domestic open source Magnolia license series agreement in simple terms

Talk about repaintboundary in fluent

能量原理与变分法笔记11:形函数(一种降维思想)

Custom view: levitation ball and accelerator ball

智能商务的数据分析平台设计与实现

从BIO到实现简单多人聊天室功能--IO模型

Implementation of remove function
随机推荐
How to use the order flow analysis tool (Part 2)
Z-Wave 800: Se firmware upgrade
How to use the order flow analysis tool (in)
Vector3.Lerp
Persistence of redis
树和二叉树
One dimensional array and object array in [c # array]-c #
VR panoramic zoo, a zoo business card with different achievements
Is cross modal semantic alignment optimal under comparative learning--- Adaptive sparse attention alignment mechanism IEEE trans MultiMedia
局域网SDN技术硬核内幕 9 从软件Overlay到硬件Overlay
多传感器融合综述---FOV与BEV
Wechat hotel reservation applet graduation project (8) graduation project thesis template
打板遇到的问题
程序员45岁之后,绝大部分都被淘汰吗?真相寒了众人的心
7、学习MySQL 选择数据库
Uniapp switches the tab bar to display different pages, remembers the page location and pulls up to get new data
小程序毕设作品之微信校园二手书交易小程序毕业设计成品(2)小程序功能
工作流引擎在vivo营销自动化中的应用实践
GNU LD script command language (I)
Custom view: levitation ball and accelerator ball