Request and Response

Michael Iacono
2 min readMar 18, 2021

Most websites work by using the request and response cycle.

The cycle has two sides, a client side, and a server side. The client side is typically on an internet browser interacting with a webpage. That webpage is sending requests through the browser on the client’s computer over the internet. The request travels until it hits the server, which will then process the request and send back an appropriate response.

In order for the request to actually make it to the server it needs to know where it is going. This happens through the Uniform Resource Locator, or more commonly know as URL.

When the server is sending back informational responses it will also send back an HTTP(Hypertext Transfer Protocol) message including a status of the request in a code format. The different codes are grouped by number into 5 main categories:

  • 100’s — gives the client general information about the request, typically that the server is still working on the request
  • 200’s — successful responses to the client with each code giving more specific information about what was successful if only certain parts were
  • 300’s — redirections to another location, usually a different server, also letting the client know that the server had to do additional work
  • 400’s — User errors giving us information as to something the user did causing there to be an error from the server
  • 500’s — Server errors let the client know that it wasn’t an issue with their machine/request and that the information was caused by something that the server needs to deal with

(source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status)

Now we can share information from one computer to another and use the data that was stored on a server on our own local computers. This allows general user computers to only need certain information actually stored on the device with the rest being stored somewhere else. It keeps the hardware free from unnecessary information stored locally while maintaining the ability to retrieve it when needed. What is more important, knowing the information, or knowing where to find it at a moments notice?

--

--