HTML Uniform Resource Locator (Uniform Resource Locators)

URL is a web address.

URL may consist of letters, such as "runoob.com", or Internet Protocol (IP) address: 192.68.20.50. Most people enter the site using the domain to access, because the name is easier to remember than numbers.


URL - Uniform Resource Locator

Web browser requests a page from the Web server through a URL.

When you click on a link in an HTML page, point to a corresponding label <a> address on the World Wide Web.

A Uniform Resource Locator (URL) for locating documents on the World Wide Web.

Example of a web page address: http://www.runoob.com/html/html-tutorial.html syntax rules:

scheme://host.domain:port/path/filename

Description:

    • scheme - type definition Internet services. The most common type is http
    • host - the domain host (default host is http www)
    • domain - the definition of Internet domain names, such runoob.com
    • : Port - port number on the definition of the host (the default port number for http is 80)
    • path - the path is defined on the server (If omitted, the document must be in the root directory of the website).
    • filename - the name defined in the document / resources

Common URL Scheme

Here are some URL scheme:

Scheme access For ...
http Hypertext Transfer Protocol With http: // at the beginning of a normal web page. Not encrypted.
https Secure Hypertext Transfer Protocol Secure pages, encrypt all the information exchanged.
ftp File Transfer Protocol For file download or upload to the site.
file   Files on your computer.

 


URL Character Encoding

URL can only use the ASCII character set.

Sending it out over the Internet. Because the URL often contains characters other than ASCII collection, URL must be converted to a valid ASCII format.

URL encoded using the "%" followed by two hexadecimal numbers to replace non-ASCII characters.

URL can not contain spaces. + URL encoding normally used to replace spaces.


Online examples

If you click on the "submit" button, the browser will be URL encoded before sending input. Page on the server will show the received input.

 

Try typing a few characters, and then click the submit button again.


URL coding examples

字符 URL 编码
%80
£ %A3
© %A9
® %AE
À %C0
Á %C1
 %C2
à %C3
Ä %C4
Å %C5

Guess you like

Origin www.cnblogs.com/fewfwf/p/11802774.html