Hypertext Transfer Protocol | HTTP Definition & Process
Table of Contents
- What Is Hypertext Transfer Protocol?
- What is Hypertext Transfer Protocol: Components and Terms
- What is HTTP Protocol: The Process of HTTP
- Lesson Summary
What is the main function of HTTP?
The main function of HTTP is to provide a system of rules facilitating the exchange of information over the internet. It allows a person to type a URL into their browser and gain access to the respective website's data.
What is hypertext transfer protocol used for?
Hypertext transfer protocol is used to exchange information over the World Wide Web. It is the system of rules which defines how clients make request messages and servers make response messages.
Table of Contents
- What Is Hypertext Transfer Protocol?
- What is Hypertext Transfer Protocol: Components and Terms
- What is HTTP Protocol: The Process of HTTP
- Lesson Summary
The definition of Hypertext Transfer Protocolabbreviated HTTPis a protocol that allows people to exchange files using the World Wide Web. But what is hypertext? What is a protocol? And what is HTTP protocol specifically? Hypertext refers to text that includes hyperlinks, unidirectional links that connect documents with other documents (or with another place within the same document). In computer science, a protocol is a system of rules that allow for data to be exchanged between different devices. HTTP is an application-level protocol, meaning it defines the format by which application processes on different devices exchange data. Thus, Hypertext Transfer Protocol is the system of rules which allows data to be transferred using the World Wide Web, where Uniform Resource Locators or URLs (for example, https://www.google.com) can be linked together by hypertext. Essentially, the purpose of HTTP is to allow for the encoding and transference of information between a client and web server.
The basic HTTP prefix is http://, but many websites use https://, which means that the website is using a secure (encrypted) form of communication for requests responses.
To unlock this lesson you must be a Study.com Member.
Create your account
To better understand HTTP and how it works, it is helpful to have a basic understanding of web servers. Web servers are essentially computers that store web information and the software they run. This software, essentially an HTTP server, understands HTTP and URLs. These computers, via their software, allow access to the web pages stored on them, which can be accessed through the domain name of the websites. Once a server is accessed, it will send back the content of a given webpage to the device from which the end-user sent the request. In order to increase the security of internet requests and responses, it is possible to use a proxy server. A proxy server intercepts the information being sent between networks, for example, a home or business computer network, and a larger network, for example, the internet. Proxy servers monitor information and help protect from spyware and malware.
The internet runs on a client-server model. This means that a server provides information to one or more clients, computers, or computer-controlled devices which make requests to web servers. The client and the web server are usually on different devices, and a network connects them. Networks can be local-area networks (LANs) or wide-area networks (WANs). Local-area networks connect devices such as computers, printers, and file servers in a limited geographical area, such as an office building. Wide-area networks connect devices or a much wider area. The Internet is the largest WAN and connects billions of devices worldwide through cables, fiber optics, and satellites. Users typically connect to the Internet through a modem which allows computers to communicate using telephone lines.
People access the World Wide Web using browserson their devices. Browsers are application software programs that provide users with a graphical interface to display information received from web networks. Browsers have caches, storage locations for temporary data, which contain files that allow the browser to display data. These files include HTML, HyperText Markup Language, a standardized system that defines how a browser will display text (font, size, etc.), images, and hyperlinks. The caches also contain files such as JavaScript, cookies, and images.
To unlock this lesson you must be a Study.com Member.
Create your account
The process of HTTP begins when a person opens a browser and types in a URL. In the past, it was necessary to type in a URL with full syntax (http://www.website.com), but now it is possible in most browsers to omit the prefixes http:// and www. Using the Domain Name System (DNS), the browser finds the IP (Internet Protocol) address of the computer server which contains the URL. By using HTTP, the browser sends a request to the server. The server sends a response, also using HTTP. Finally, the browser renders this response and displays the website.
The requests and responses exchanged during this process are known as HTTP messages. Request messages have a basic format with three sections: a request-line, header fields, and an optional message body. The response message begins with a status line, header fields, and an optional message body. The HTTP Working Group, the group responsible for maintaining and developing the Hypertext Transfer Protocol, give the following example of a basic request-response protocol exchange on their website:
Client request:
GET /hello.txt HTTP/1.1
User-Agent: curl/7.16.3 libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3
Host: www.example.com
Accept-Language: en, mi
Server response:
HTTP/1.1 200 OK
Date: Mon, 27 Jul 2009 12:28:53 GMT
Server: Apache
Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT
ETag: "34aa387-d-1568eb00"
Accept-Ranges: bytes
Content-Length: 51
Vary: Accept-Encoding
Content-Type: text/plain
Hello World! My payload includes a trailing CRLF.
HTTP requests use various strings of characters, known as methods, to indicate what action needs to be performed. The method used in the previous example, GET, is one of the most common. The following is a list of some common methods and what they do.
- GET- this protocol is used to request specific information. The requests are cached, stored in browser history, and can be bookmarked. They cannot be used to modify information.
- POST - this protocol is used to send data to a server to modify information. Posts are not cached or stored in browser history. There is no limit to the amount of information that can be contained in a post request.
- PUT - this protocol is similar to POST but is idempotent, meaning if the request is sent multiple times, it will change only one resource instead of creating multiple resources.
- HEAD - this protocol is similar to GET but will not return a message body. This can be used to check what data a GET protocol will return.
- DELETE- this protocol is used to delete a resource.
Through a system of devices, networks, and software, the Internet allows people all over the world to exchange information almost instantaneously. HTTP is the protocol that defines how clients and servers interact in this process. For this reason, it is one of the key components of the World Wide Web.
To unlock this lesson you must be a Study.com Member.
Create your account
Hypertext Transfer Protocol, or HTTP, is the protocol that defines how clients and servers exchange information over the World Wide Web. In this sense, a protocol is a system of rules that standardizes and facilitates how information is exchanged. The basic HTTP prefix is http://. Some websites use https://, indicating the website is using a secure encryption method for requests and responses.
Looking at the infrastructure of the Internet more broadly, computers or computer-controlled devices called clients make requests from web servers. Web servers are hardware and software which host websites and store web information. Through a system of local-area and wide-area networks, billions of devices are connected to the Internet, including these clients and web servers. Sometimes, proxy networks are used to intercept and monitor communication between clients are servers, providing additional security measures and spyware and malware. On their client devices, people use browsers, software applications that provide graphic displays of web information. These browsers contain caches with files that assist in the process of displaying information.
When a person opens their browser and enters a URL, the browser uses that URL to find the IP address of the server computer where the website is hosted. Then the browser sends an HTTP request message to the server. The server sends back an HTTP response message. The browser renders this message and displays the webpage. These messages are structured with a specific syntax. The request messages contain methods, which indicate what action should be performed, such as GET to request information and POST to modify information.
To unlock this lesson you must be a Study.com Member.
Create your account
Additional Info
What Is Hypertext Transfer Protocol?
John was working on a science project about polar bears and his teacher told him that he could find useful information on the National Geographic website. So John went to his school librarian and asked how he could get to the National Geographic website. The librarian took John to a computer, opened up a web browser and typed in the web address for National Geographic, http://www.nationalgeographic.com. John then asked the librarian how he could access this website on his personal laptop. The librarian explained that John would need to open any web browser on his laptop and type in the web address, also known as the URL, of the National Geographic website. A web browser, the librarian explained to John, is a program on John's laptop that will allow him to view web pages.
In the process of learning about polar bears, John also learned that in order to access a website you need a web address or a URL, and that most URLs start with the prefix http://. This 'http' is short for Hypertext Transfer Protocol, and we'll learn more below about just what that phrase means.
You may also notice that some websites, such as those where you might type in your credit card information for making purchases, use the prefix https://. This indicates that the website is using a secure method of communication to transfer data. It used to be that you'd have to type in one of these prefixes by hand to go to the correct web address, like the librarian did for John. But since http:// and https:// are so commonly used, most websites now allow you to access their site by leaving out the prefix. So when John gets home to his own computer, he can type in www.nationalgeographic.com and his web browser will know that there's also an http:// in the address. In this case, the http:// protocol is used even though it is not reflected in the URL.
How Does Hypertext Transfer Protocol Work?
All of the pages, files, images, videos, and other data of a website live on one or more computers that are also known as web servers. When you type the web address or URL of any site into a web browser, the browser finds the server and transfers that content from the server to your browser so that you can see the information on your computer as a web page. Using the HTTP protocol (protocol here just means 'rules'), information is exchanged between the web server and the web browser. Hypertext Transfer Protocol, or HTTP, is the set of rules (or protocols) used by the browser and the server for transferring information on the web.
As noted above, when you type in the URL of any web site into your browser, it sends a request to the web server that corresponds to the address of the URL. So when John typed the web address of National Geographic into the browser on his laptop, his laptop sent a request to the address of the web server where the National Geographic files are stored. When the web server received the request, the server then gathered all the information relating to the National Geographic website and sent it back to John's browser.
A web server holds all the information about a website, and the server may be constantly receiving requests for the site from any number of people who are browsing the site. The server has to respond to each and every one of these requests and transfer the required files to each person's browser. The server and the browser communicate using the HTTP method, which helps the server understand what the browser is requesting and how to interpret the requests made by the browser. HTTP protocol thus includes rules about how web content should be formatted, how dates are formatted and how web addresses or URLs should be identified.
If the browser is not able to communicate with the server, the browser will display an error message indicating that the server could not be reached. If John makes a spelling mistake as he types in the address of the National Geographic website, the browser will not be able to find the server at the incorrect address. There will be an HTTP error, and John will see a blank page on his browser. Also, if for some reason the computer or server where the National Geographic files are stored isn't working or just isn't currently available on the web, the browser will not be able to find the server and this again will cause an HTTP error. Or sometimes a web address that you have may not exist on the server any more, so the HTTP protocol will not be able to find the web page and this will also generate an error message. So in order for a website to be returned, both the browser and the server should be able to communicate and interpret the HTTP requests.
Lesson Summary
HTTP stands for Hypertext Transfer Protocol and defines the sets of rules (or protocols) that should be followed by web servers and browsers in order for web pages to be displayed correctly. The URL, or web address, of most websites thus starts with the http:// (or, for more secure browsing, https://) prefix. But since this is very common, most websites will allow you to type in the URL without the prefix.
HTTP protocol includes rules about how web content should be formatted, how dates are formatted and how URLs or web addresses should be identified. An HTTP error is generated if the URL is typed in incorrectly, or if the web server is down or the web page does not exist on the server any more.
To unlock this lesson you must be a Study.com Member.
Create your account
Register to view this lesson
Unlock Your Education
See for yourself why 30 million people use Study.com
Become a Study.com member and start learning now.
Become a MemberAlready a member? Log In
BackResources created by teachers for teachers
I would definitely recommend Study.com to my colleagues. It’s like a teacher waved a magic wand and did the work for me. I feel like it’s a lifeline.