How does the communication between a browser and a web server take place?

后端 未结 8 1728
梦谈多话
梦谈多话 2020-12-12 10:51

Can anyone explain how the communication takes place between the browser and web server? I want to learn how

  • GET, POST verbs (among others)
  • cookies
相关标签:
8条回答
  • 2020-12-12 11:37

    Communication between a browser and a webserver takes place at so many levels that is close to impossible to answer this question. HTTP plays a role, but HTTP is meaningless without TCP which is meaningless without IP which is meaningless without a physical network on which it sent. Then, there are POST vs GET requests which are similar but enough different to warrant a special dicussion. Sometimes an HTTP request needs to be authenticated, sometimes, it needs not. Mime types should be mentioned. Then, a browser sends a different request if there is a proxy. And then also encodings play a role. So, I guess, the most concise answer to this kind of question is: the browser asks the server for data and the server gives the requested data to the browser.

    0 讨论(0)
  • 2020-12-12 11:43

    It depends on the web server, but if you're wondering what it looks like from the client side, just install Live Headers and Firebug for firefox. With the net tab in firebug and live headers open, it should be clear exactly how the two interact.

    For a more in-depth look at the actual data going back and forth, use wireshark.

    0 讨论(0)
提交回复
热议问题