Skip to content
Get lifelong access to all courses and certifications with Full Access.
Get lifelong access to all courses and certifications with Full Access.
What is HTTP

What is HTTP

đź‘‹ Introduction

HTTP is something we can see used before the links for web pages.

Developers needs to understand this protocol because of its widespread use in transferring data.

This blog post will let you know how the concept works.

What is HTTP

HTTP stands for Hyper Text Transfer Protocol

WWW is about communication between web clients and servers

Communication between client computers and web servers is done by sending HTTP Requests and receiving HTTP Responses

World Wide Web Communication

The World Wide Web is about communication between web clients and web servers.

Clients are often browsers (Chrome, Edge, Safari), but they can be any type of program or device.

Servers are most often computers in the cloud.

HTTP model overview

HTTP Request / Response

Communication between clients and servers is done by requests and responses:

  1. A client (a browser) sends an HTTP request to the web
  2. A web server receives the request
  3. The server runs an application to process the request
  4. The server returns an HTTP response (output) to the browser
  5. The client (the browser) receives the response

The HTTP Request Circle

A typical HTTP request / response circle:

  1. The browser requests an HTML page. The server returns an HTML file.
  2. The browser requests a style sheet. The server returns a CSS file.
  3. The browser requests an JPG image. The server returns a JPG file.
  4. The browser requests JavaScript code. The server returns a JS file
  5. The browser requests data. The server returns data (in XML or JSON).

XHR - XML Http Request

All browsers have a built-in XMLHttpRequest Object (XHR).

XHR is a JavaScript object that is used to transfer data between a web browser and a web server.

XHR is often used to request and receive data for the purpose of modifying a web page.

Despite the XML and Http in the name, XHR is used with other protocols than HTTP, and the data can be of many different types like HTML, CSS, XML, JSON, and plain text.

The XHR Object is a Web Developers Dream, because you can:

  • Update a web page without reloading the page
  • Request data from a server - after the page has loaded
  • Receive data from a server - after the page has loaded
  • Send data to a server - in the background

The XHR Object is the underlying concept of AJAX and JSON:

How http request works

Summary

HTTP is a protocol and a standard for how browsers (Chrome, Firefox, Safari, or Edge) and servers communicate.
It is an essential concept for web developers because of its widespread use in transferring data.

Feel free to let us know your feedback in the comments field below! 👇

Subscribe to this blog's RSS feed using https://campus.w3schools.com/blogs/blog.atom

Previous article What is MERN stack
Next article What is timeboxing

Comments

Qasem Ali - July 29, 2022

Thanks

amZ - July 26, 2022

Thanks

Veena Sharma - July 23, 2022

thank you w3 school

Remzi - July 23, 2022

Photo

Leave a comment

* Required fields