如何做一个浏览器和Web服务器之间的通信发生? [英] How does the communication between a browser and a web server take place?

查看:409
本文介绍了如何做一个浏览器和Web服务器之间的通信发生?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谁能解释的通信是如何发生的浏览器和Web服务器之间的地方吗?
我想学习如何

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


  • GET,POST动词(等等)

  • 饼干

  • 会议

  • 查询字符串

幕后的工作。

推荐答案

超文本传输​​协议(HTTP)是用于传输网页(如一个你现在阅读的)的协议。协议是真的只是一个做事的标准方法。如果要满足美国的president,或一个国家的国王,就不会有那你就必须遵循特定的程序。你不能只是走了,并说:嘿伙计。会有走一种特定的方式,说话,一个标准的问候,并结束谈话的标准方法。在TCP / IP堆栈协议达到同样的目的。

Hyper Text Transfer Protocol (HTTP) is a protocol used for transferring web pages (like the one you're reading right now). A protocol is really nothing but a standard way of doing things. If you were to meet the President of the United States, or the king of a country, there would be specific procedures that you'd have to follow. You couldn't just walk up and say "hey dude". There would be a specific way to walk, to talk, a standard greeting, and a standard way to end the conversation. Protocols in the TCP/IP stack serve the same purpose.

在TCP / IP协议栈有四层:应用,传输,互联网和网络。在每一层有,用于标准化的信息流不同的协议,并且每一个是(在计算机上运行),这些会用来作为它的向下移动的TCP / IP堆栈的信息格式化为分组的计算机程序。一个数据包的应用层数据的组合,传输层报头(TCP或UDP)和IP层报头(网络层采用数据包,并把它变成一个帧)。

The TCP/IP stack has four layers: Application, Transport, Internet, and Network. At each layer there are different protocols that are used to standardize the flow of information, and each one is a computer program (running on your computer) that's used to format the information into a packet as it's moving down the TCP/IP stack. A packet is a combination of the Application Layer data, the Transport Layer header (TCP or UDP), and the IP layer header (the Network Layer takes the packet and turns it into a frame).

...由使用该网络来传输数据的所有应用程序。它不关心数据的两个点之间是如何得到它知之甚少网络的状态。应用程序将数据传递给在TCP / IP堆栈中的下一层,然后继续,直到收到回复执行其他功能。应用层使用主机名(如www.dalantech.com)解决。的应用层协议的实例:超文本传输​​协议(HTTP -web浏览),简单邮件传输协议(SMTP - 电子邮件),域名服务(DNS -resolving主机名到IP地址),仅举几例。

...consists of all applications that use the network to transfer data. It does not care about how the data gets between two points and it knows very little about the status of the network. Applications pass data to the next layer in the TCP/IP stack and then continue to perform other functions until a reply is received. The Application Layer uses host names (like www.dalantech.com) for addressing. Examples of application layer protocols: Hyper Text Transfer Protocol (HTTP -web browsing), Simple Mail Transfer Protocol (SMTP -electronic mail), Domain Name Services (DNS -resolving a host name to an IP address), to name just a few.

应用层的主要目的是提供在不同的操作系统的像帧间preTER -kind运行的应用程序之间的公共命令语言和语法。是由使用所述网络的应用程序发送的数据被格式化以符合的几个组的标准之一。接收计算机可以理解,如果正在运行不同的操作系统比发送者正被送往即使由于所有网络应用符合标准的数据。

The main purpose of the Application Layer is to provide a common command language and syntax between applications that are running on different operating systems -kind of like an interpreter. The data that is sent by an application that uses the network is formatted to conform to one of several set standards. The receiving computer can understand the data that is being sent even if it is running a different operating system than the sender due to the standards that all network applications conform to.

...是负责向应用分配源和目的地端口号。端口号用于由用于寻址传输层和它们的范围从1到65,535。从0到1023的端口号被称作众所周知的端口。下面256号保留用于在应用层上运行的公共(标准)的服务。这里有几个:25 SMTP,53 DNS(UDP进行域名解析和TCP的区域传输),和80用于HTTP。从256到1023的端口号是由IANA分配给公司的,他们出售的应用程序。

...is responsible for assigning source and destination port numbers to applications. Port numbers are used by the Transport Layer for addressing and they range from 1 to 65,535. Port numbers from 0 to 1023 are called "well known ports". The numbers below 256 are reserved for public (standard) services that run at the Application Layer. Here are a few: 25 for SMTP, 53 for DNS (udp for domain resolution and tcp for zone transfers) , and 80 for HTTP. The port numbers from 256 to 1023 are assigned by the IANA to companies for the applications that they sell.

端口号从1024到65,535用于客户端应用程序使用的是阅读此页-The web浏览器,例如。 Windows将只分配端口号达比基于Windows的PC足够的端口号5000 - 更多。每个应用程序具有由传输层,使得作为数据由传输层接收它知道哪个应用程序的数据给到分配给它的唯一的端口号。一个例子是,当你有多个浏览器窗口中运行。每个窗口是用来浏览网页的程序一个单独的实例,而且每一个都有分配给它,所以你可以去www.dalantech.com在一个浏览器窗口不同的端口号,本网站不加载到其他浏览器窗口。喜欢Firefox的应用程序,使用标签窗口只需分配给每个标签的唯一端口号

Port numbers from 1024 to 65,535 are used for client side applications -the web browser you are using to read this page, for example. Windows will only assign port numbers up to 5000 -more than enough port numbers for a Windows based PC. Each application has a unique port number assigned to it by the transport layer so that as data is received by the Transport Layer it knows which application to give the data to. An example is when you have more than one browser window running. Each window is a separate instance of the program that you use to surf the web, and each one has a different port number assigned to it so you can go to www.dalantech.com in one browser window and this site does not load into another browser window. Applications like FireFox that use tabbed windows simply have a unique port number assigned to each tab

...是胶水,黏住网络。它允许发送,接收和数据的路由。

...is the "glue" that holds networking together. It permits the sending, receiving, and routing of data.

...由您的网络接口卡(NIC)和与它相连的电缆。它是用于传输和接收数据的物理介质。网络层使用媒体访问控制(MAC)地址,如前所述,用于寻址。的MAC地址被固定在被制造的界面的时间,并且不能被改变。有少数例外,如DSL路由器,让您克隆网卡的MAC地址在您的PC。

...consists of your Network Interface Card (NIC) and the cable connected to it. It is the physical medium that is used to transmit and receive data. The Network Layer uses Media Access Control (MAC) addresses, discussed earlier, for addressing. The MAC address is fixed at the time an interface was manufactured and cannot be changed. There are a few exceptions, like DSL routers that allow you to clone the MAC address of the NIC in your PC.

有关更多的信息:

  • Protocols
  • TCP/IP

这篇关于如何做一个浏览器和Web服务器之间的通信发生?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆