Menu

Protocols & Layers

HTTP

HTTP (HyperText Transfer Protocol) is the protocol a web browser uses to request web pages from a web server. The web server answers each HTTP request by sending the requested web page back to the browser, which then displays it on screen.

HTTP works as a request and response pair. The browser sends an HTTP request that names the server and the page it wants. The web server receives it, finds that page, and returns it in an HTTP response. Your browser cannot show a page until the response carrying its content has arrived, so a slow connection means a slow page.

A worked example

Suppose you click a link to a page called clubs.html on your school's website. Your browser sends an HTTP request naming clubs.html to the server that stores the site. The server locates the file and sends it back in an HTTP response. The browser reads the response and draws the page for you. If the file is not there, the server still replies, but the response reports the page as not found, so the browser shows an error instead of the page.

The web browser sends an HTTP request for clubs.html to the web server, which finds the file and sends the page back in an HTTP response for the browser to draw. If the file is not there, the response says the page was not found and the browser shows an error.

HTTP itself does not encrypt the messages, so anyone able to intercept them could read the page content. The encrypted version of HTTP is HTTPS.

Practise this