HTTP Definition & How does it Work?
HTTP (Hypertext Transfer Protocol) is a collaborative, distributed, hypermedia information system app protocol that enables users to communicate data on the World Wide Web. You see HTTP when you visit a website because the protocol is listed in the URL (for ex, https://techiechilly.blogspot.com/).
Like other
protocols like File Transfer Protocol, HTTP uses specific request methods to
perform various tasks. With HTTP, a web browser requests HTML files from a web
server, which are then displayed in the browser with associated text, images,
hyperlinks, and assets.
[You can usually remove the protocol from a URL by typing
it into the browser's address bar, Because browsers communicate over HTTP].
What’s the History of HTTP ?
In the early 1990s, Tim Berners-Lee has developed the first HTTP standard
as part of his work to define the original World Wide Web (www). Three main
versions were provided in the 1990s:
- HTTP 0.9 –
It basically supports hypertext
documents.
- HTTP
1.0 - Extensions to support large websites.
- HTTP 1.1 – The standardized protocol designed to address the performance limitations of HTTP 1.0 specified in Internet RFC 2068.
In 2015, the latest
version of HTTP 2.0, became a recognized standard. It maintains backwards
compatibility with HTTP 1.1, but provides extra performance improvements.
The HTTPS standard
adds encryption to HTTP by using secure socket layer, or later, transport layer
security, while the HTTP standard does not encrypt traffic sent over a network.
How does HTTP Works ?
It is an app layer
protocol built on top of TCP and uses a client-server communication model. Most
information sent over the Internet, including website content and API calls,
uses the HTTP protocol. HTTP
clients and servers communicate using requests and response messages. There are the three
main HTTP message types are GET, POST & HEAD.
- HTTP GET - The GET method requests a
representation of the specified resource. With GET, Requests should
only retrieve data.
- HTTP POST – The POST method sends an entity to the specified resource, often
causing a state change or side effects on the server.
- HTTP HEAD – The HEAD method requests a response, which is identical to a GET
request but without the response body. The server simply returns the header
information (contained in the HTML section).
The browser initiates communication with an HTTP server by initiating a
TCP connection to the server. By default, Web browsing sessions use server port
80, although other ports such as 8080 are sometimes used. It triggers the
sending and receiving of HTTP messages by visiting the web page, once a session
is established.
HTTP is a so-called stateless system. Means, unlike other file transfer
protocols like FTP, the HTTP connection will be dropped once the request is
complete. After your web browser sends the request and the server responds with
the page, the connection will be closed.
How to Fix HTTP Error ?
The messages transmitted over HTTP can fail for several reasons:
- User error.
- Web browser or web server malfunction.
- Website creation error.
- Temporary network outages.
The protocol captures the cause of the error and
reports an error code to the browser known as the HTTP status code/line, when
these errors occur. Errors start with a specific number to indicate what type
of error it is.
For ex- errors with an error code beginning with four indicate that the page request could not be completed successfully or that the request contains incorrect syntax. For ex- 404 errors mean that a website cannot be found; some websites even offer fun custom 404 error pages.
Comments
Post a Comment