URL:Uniform Resource Locator,統(tǒng)一資源定位符URI:Uniform Resource Identifier,統(tǒng)一資源標(biāo)志符URL 是一種比較統(tǒng)一的帶參數(shù)指向某個地址的格式。格式為:

[協(xié)議類型]://[訪問資源需要的憑證信息]" />

国产成人精品无码青草_亚洲国产美女精品久久久久∴_欧美人与鲁交大毛片免费_国产果冻豆传媒麻婆精东

18143453325 在線咨詢 在線咨詢
18143453325 在線咨詢
所在位置: 首頁 > 營銷資訊 > 建站知識 > URL是什么意思?

URL是什么意思?

時間:2023-02-14 21:54:01 | 來源:建站知識

時間:2023-02-14 21:54:01 來源:建站知識

這個維基百科上有翻譯。

URL 是一種比較統(tǒng)一的帶參數(shù)指向某個地址的格式。格式為:

[協(xié)議類型]://[訪問資源需要的憑證信息]@[服務(wù)器地址]:[端口號]/[資源層級UNIX文件路徑][文件名]?[查詢]#[片段ID]
比如這個問題,URL 是

https://www.zhihu.com/question/324392663https 是協(xié)議,使用默認(rèn)賬戶訪問,端口是 https 默認(rèn)的 443,路徑是 /question/324392663。




如果要尋找精準(zhǔn)定義,我們可以翻 RFC。URL 的 RFC 是 rfc1738 。

它自己介紹道

The specification is derived from concepts introduced by the World-Wide Web global information initiative, whose use of such objects dates from 1990 and is described in "Universal Resource Identifiers in WWW", RFC 1630. The specification of URLs is designed to meet the requirements laid out in "Functional Requirements for Internet Resource Locators"
在 RFC 1630 中有對 URL,URI,URN 的區(qū)分如下:

URIs
This document defines a way to encapsulate a name in any registered name space, and label it with the the name space, producing a member of the universal set. Such an encoded and labelled member of this set is known as a Universal Resource Identifier, or URI.
The universal syntax allows access of objects available using existing protocols, and may be extended with technology.
The specification of the URI syntax does not imply anything about the properties of names and addresses in the various name spaces which are mapped onto the set of URI strings. The properties follow from the specifications of the protocols and the associated usage conventions for each scheme.

URLs
For existing Internet access protocols, it is necessary in most cases to define the encoding of the access algorithm into something concise enough to be termed address. URIs which refer to objects accessed with existing protocols are known as "Uniform Resource Locators" (URLs) and are listed here as used in WWW, but to be formally defined in a separate document.

URNs
There is currently a drive to define a space of more persistent names than any URLs. These "Uniform Resource Names" are the subject of an IETF working group's discussions. (See Sollins and Masinter, Functional Specifications for URNs, circulated informally.)
The URI syntax and URL forms have been in widespread use by World-Wide Web software since 1990.
-- https://tools.ietf.org/html/rfc1630
太長誰幫我翻譯下... 簡單說,我們可以看到,URL 是 URI 的一部分,不過因為特別重要,用于 WWW 中,所以單獨(dú)列出來,放在 rfc1738 中。

那么,如何定義“用于 WWW 范疇” 呢?rfc1738 列舉了一些例子:

3. Specific Schemes

The mapping for some existing standard and experimental protocols is
outlined in the BNF syntax definition. Notes on particular protocols
follow. The schemes covered are:

ftp File Transfer protocol
http Hypertext Transfer Protocol
gopher The Gopher protocol
mailto Electronic mail address
news USENET news
nntp USENET news using NNTP access
telnet Reference to interactive sessions
wais Wide Area Information Servers
file Host-specific file names
prospero Prospero Directory Service

Other schemes may be specified by future specifications. Section 4 of
this document describes how new schemes may be registered, and lists
some scheme names that are under development.
因此它指向網(wǎng)上的地址,但并不特指我們的網(wǎng)頁。

Section 4 中提到的維護(hù)了一組 schema 全集。我們可以在這個地方找到一個 “URI schemas” 但 url schemas 并沒有找到。我懷疑這是改名了的緣故。

此外,很多產(chǎn)品還可以按照這個規(guī)則自定義 URL。比如 jdbc 登錄 mysql。mysql 是一個數(shù)據(jù)庫,通過 jdbc 訪問可以用一個字符串代表所有連接信息。

比如 connection URL 為 jdbc:mysql://sandy:secret@host1:3306/sakila?key1=value1&key2=value2

協(xié)議為 jdbc:mysql 用戶 sandy 口令 secret 地址 host1 端口 3306 數(shù)據(jù)庫 sakila,其余參數(shù) key1:value1, key2:value2 等等。

此外,mongo 等各種數(shù)據(jù)庫也有類似的連接字符串。

URI 的定義在 rfc3986 中。在 rfc3986 中列出一系列例子:

1.1.2. Examples

The following example URIs illustrate several URI schemes and
variations in their common syntax components:

ftp://ftp.is.co.za/rfc/rfc1808.txt

http://www.ietf.org/rfc/rfc2396.txt

ldap://[2001:db8::7]/c=GB?objectClass?one

mailto:John.Doe@example.com

news:comp.infosystems.www.servers.unix

tel:+1-816-555-1212

telnet://192.0.2.16:80/

urn:oasis:names:specification:docbook:dtd:xml:4.1.2
我們可以看到 URL 的各種格式也在其中,不過還有 urn 的一些格式。

綜上,我們可以結(jié)論如下:

  1. URL 俗稱網(wǎng)頁地址,網(wǎng)址,直譯統(tǒng)一資源定位符,但網(wǎng)頁地址并不只是 http 和 https
  2. 網(wǎng)址( URL ) 和鏈接 ( Link ),超鏈接(Hyperlink) 關(guān)系有點(diǎn)微妙...
  3. URL 是相對古老的名稱,我們簡單講 URL == 網(wǎng)頁地址也行。不過這種格式被廣泛使用,它們也自稱 URL。rfc 雖然要求需要向 iana 提供文檔,不過由于是內(nèi)部使用,你說人家不是 URL 這個有點(diǎn)吹毛求疵
  4. 現(xiàn)在很多直接稱其為 URI,直譯統(tǒng)一資源標(biāo)識符。它包括 URL 的所有內(nèi)容,以及 URN 的部分。這個也完全沒問題
  5. 不糾結(jié)
歡迎討論。

參考:



關(guān)鍵詞:

74
73
25
news

版權(quán)所有? 億企邦 1997-2025 保留一切法律許可權(quán)利。

為了最佳展示效果,本站不支持IE9及以下版本的瀏覽器,建議您使用谷歌Chrome瀏覽器。 點(diǎn)擊下載Chrome瀏覽器
關(guān)閉