Foundations

How the web talks

30 min

A browser asks, a server answers. Each ask is a request and each answer is a response.

What is inside

  • a method such as GET or POST
  • a path such as /login
  • headers, small labels like Cookie and User-Agent
  • sometimes a body, for example a submitted form

The response has a status code (200 fine, 404 missing, 500 server problem), headers and a body.

Try it

Open any site, press F12, open the Network tab and reload. Click the first row and read the request headers and the response headers. Find the Set-Cookie header on a site where you sign in.