I’ve always wondered, because I see that they send 404 or 500 or whatever and they send the HTML.
But what do web browsers send packet-wise to get that information(I mean details about what the TCP packet it sends)
I’ve always wondered, because I see that they send 404 or 500 or whatever
Share
Basic things you need to know if you don’t want to read the long specs:
Computers communicate on the internet using multiple protocol layers (like in an onion). The top layer is called an application layer; in the case of a browser and a web server, that protocol is called HTTP. It describes headers and response codes and such.
Underneath that protocol, there’s a transport protocol called TCP that ensures that the packets sent over the Internet all arrive properly, and in the correct order. Underneath that, there’s a routing protocol called IP that makes sure that the packets on the internet – flowing through a bunch of intermediary computers – do get to the destination.
Each of these layers has its own specifications, packet headers, and so forth. The HTTP packet is wrapped inside a TCP packet, and all that magic is wrapped inside an IP packet.
There are several other layers involved (google “OSI model” if you want details), but this should give you a starting point.