protocols
by Workshop, 8 July 1998what are protocols?
You may have wondered during your web surfing what the http:// part that is in front of web addresses means. All the text before the double slashes (//) specify a protocol in a complete web address (http://www.somesite.com). This is referred to as a URL (Uniform Resource Locator)
"Protocols" refers to a set of rules that computers observe when communicating with each other. A different protocol is used according to the type of communication taking place between computers eg: sending email, transferring a file or visiting news groups etc. The protocols are built into software such as web browsers or dedicated programs that reside on your computer, which allow you to perform these different functions.
| protocol | description |
| FTP | File Transfer Protocol enables you to copy/transfer files from one computer to another. Some well known FTP software includes CuteFTP. |
| Gopher | A system of displaying information on the Internet in a "menu" format popular before the emergence of the World Wide Web and Web browsers. Although still available, Gopher software is barely used at all today. |
| HTTP | "Hypertext Transfer Protocol" is the basis of HTML, software used for formatting Web pages. |
| Mailto | Enables the sending of messages around the internet initiated by the browser. |
| News | Used for visiting and posting to newsgroups around the internet. |
using protocols in web pages (HTML documents)
A web browser allows you to use several different protocols that are defined within a web page to perform various tasks. For example, just say you wanted to provide a link to a file to an FTP site on your web page so that when a visitor clicked on the link, the browser would fetch that file for them.
<A HREF="ftp://ftp.riada.com/pub/software/rhln113.exe">Click here to download
RiadaHeadline</a>
The ftp:// section of the above link tells the browser not to get a HTML web page, but to download a file called rhln113.exe from the ftp site ftp.riada.com/pub/software.
The basic concept here is that when using a link in a web page, you choose a protocol and address that reflects the functionality the link provides. For example, if you wanted the user to see a new web page when they clicked on a link, you would use http:// as the protocol and then place the web page address directly after the protocol. If you wanted the visitor to be able to send email to a specified email address, you would use mailto: and then the mail address you want to send mail to.
examples
The following HTML example code shows how the mailto protocol is used. Clicking on this will cause your default mail program to be launched with the email address in the "to" field. Click the link in the browser section to see how it works.
| code | result |
<a href="mailto:misc@somesite.com">Send mail to misc@somesite.com</a>
|
Send mail to misc@somesite.com |
The following example HTML code shows how the http protocol is used to display web pages. Clicking on this link will tell the browser to load the page index.html on the site http://www.riada.com. Click the link in the browser section to see how it works.
| code | result |
<a href="http://www.riada.com/">Click here for Riada's home page</a>
|
Click here for Riada's home page |
The following example shows how to use the ftp protocol to allow someone to download a file over the internet, through their web browser. Clicking on this link will tell the browser to download the file rhln113.exe from the subdirectory pub/software on the ftp site ftp.riada.com.
| code | result |
<a href="ftp://ftp.riada.com/pub/
software/rhln113.exe">Click here to
download RiadaHeadline</a>
|
Click here to download RiadaHeadline |
