前端讲义01:了解URL

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/msh2016/article/details/89684111

URL(Uniform Resource Locator,统一资源定位器 ),用于描述一个网络上的资源

基本格式  schema://host[:port#]/path/.../filename[?query-string][#anchor]

heme             指定低层使用的协议(例如:http, https, ftp)
host               HTTP服务器的IP地址/域名
port#              HTTP服务器的默认端口是80(可省略)
path               访问资源的路径,从域名后的第一个“/”开始到最后一个“/”为止
query-string   发送给http服务器的数据,参数名与值用=隔开,参数之间用“$"符号连接
anchor           锚

举例

https://blog.csdn.net/msh2016/test.aspx?name=sviergn&x=true#stuff
schema:              https
host:                   blog.csdn.net
path:                   /msh2016/test.aspx
Query String:      name=sviergn&x=true
Anchor:               stuff

Scheme对应资源
file    访问本地磁盘的文件
ftp    访问远程FTP服务器的文件
http    访问HTTP服务器的文件
https    访问(加密方式)HTTP服务器的文件
news    访问新闻组上的文件
telnet    访问Telnet连接
gopher    访问远程Gopher服务器的文件
mailto    访问(通过SMTP协议)电子邮箱地址,打开当前计算机系统中默认的电子邮件客户端软件


 

猜你喜欢

转载自blog.csdn.net/msh2016/article/details/89684111