The URL Schemes


A URL (Uniform Resource Locator) is a string of characters that specifies the location of a resource on the internet. URL schemes are the protocol that is used to access the resource.

Here are the most common URL schemes −

Http

HTTP (Hypertext Transfer Protocol) is a protocol used to transmit data over the internet. It is the standard protocol for accessing web pages on the internet, and is used by browsers to communicate with web servers and retrieve web pages.

When you enter a URL in your web browser that begins with "http," your browser sends a request to the server using the HTTP protocol. The server responds by sending back the requested web page or resource. The data is transmitted in the form of messages, which consist of a request from the client (such as a browser) and a response from the server.

HTTP is a stateless protocol, which means that it does not maintain a persistent connection between the client and the server. Each request and response is treated as an independent transaction

Https

HTTPS (Hypertext Transfer Protocol Secure) is a secure version of the HTTP protocol used to transmit data over the internet. It is commonly used to access web pages that contain sensitive information, such as login pages and online payment forms.

When you enter a URL in your web browser that begins with "https," your browser establishes a secure connection with the server using the SSL/TLS (Secure Sockets Layer/Transport Layer Security) protocol. This encrypts the data transmitted between the client and the server, ensuring that it cannot be intercepted or read by third parties.

Ftp

FTP (File Transfer Protocol) is a protocol used to transfer files over the internet. It is commonly used to upload and download files from a server.

When you enter a URL in your web browser that begins with "ftp," your browser will open an FTP client, which is a software program that allows you to transfer files using the FTP protocol. The FTP client establishes a connection to the server and allows you to browse the files and directories on the server, as well as upload and download files.

FTP is a client-server protocol, which means that it requires a client program (such as an FTP client) and a server program (such as an FTP server) to transmit data. The FTP server stores the files that are available for transfer, and the FTP client allows the user to access and transfer these files.

File

The "file" URL scheme is used to access a file on the local system. It is typically used to access resources that are stored on the same computer as the web browser.

A "file" URL has the following format −

file −///path/to/file

The "path/to/file" is the location of the file on the local system, specified using a file path. The file path can be either absolute (including the full path from the root directory of the file system) or relative (including only the path from the current directory).

Mailto

The "mailto" URL scheme is used to create a link that opens the default email client and creates a new email message with a pre-filled "To" field.

A "mailto" URL has the following format −

mailto: email@address.com

When a user clicks on a link with a "mailto" URL, their default email client will open and create a new email message with the specified email address in the "To" field. The user can then add a subject and message body and send the email as they would normally.

Tel

The "tel" URL scheme is used to create a link that initiates a phone call when clicked.

A "tel" URL has the following format −

tel :+1234567890

The phone number is specified using the E.164 formatting standard, which includes the country code, area code, and local number, separated by the "+" sign and no spaces.

When a user clicks on a link with a "tel" URL, their default phone application will open and initiate a call to the specified phone number. The user can then complete the call as they would normally.

Sms

The "sms" URL scheme is used to create a link that initiates the sending of a text message when clicked.

An "sms" URL has the following format −

sms :+1234567890

The phone number is specified using the E.164 formatting standard, which includes the country code, area code, and local number, separated by the "+" sign and no spaces.

When a user clicks on a link with an "sms" URL, their default messaging application will open and initiate the sending of a text message to the specified phone number. The user can then add a message and send the text as they would normally.

Skype

The "skype" URL scheme is used to create a link that initiates a Skype call or chat when clicked.

A "skype" URL has the following format −

skype :username?call

The "username" is the Skype username of the person you want to call or chat with. The "call" parameter specifies that the link should initiate a Skype call, while the "chat" parameter specifies that the link should initiate a Skype chat.

Updated on: 09-Jan-2023

3K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements