Skip to content

Commit 4d00799

Browse files
Correct packet description (mdn#41495)
* Correct packet description * Small grammar updates * Fixes for hamish review comments
1 parent 7412889 commit 4d00799

File tree

1 file changed

+13
-8
lines changed
  • files/en-us/learn_web_development/getting_started/web_standards/how_the_web_works

1 file changed

+13
-8
lines changed

files/en-us/learn_web_development/getting_started/web_standards/how_the_web_works/index.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ In order for data to get back and forth, we need the following things:
7272

7373
When you type a web address (which is technically part of a [URL](#components_of_a_url)) into your browser address bar, the following steps occur:
7474

75-
1. The browser goes to the DNS server and finds the real address of the server that the website lives on (you look up the address of the shop).
76-
2. The browser sends an HTTP request message to the server, asking it to send a copy of the website to the client (you go to the shop and order your goods). This message, and all other data sent between the client and the server, is sent across your internet connection using TCP/IP.
77-
3. If the server approves the client's request, the server sends the client a "200 OK" message, which means "Of course you can look at that website! Here it is", and then starts sending the website's files to the browser as a series of small chunks called [data packets](#packets_explained) (the shop gives you your goods, and you bring them back to your house).
78-
4. The browser assembles the small chunks into a complete web page and displays it to you (you get the goods home — new shiny stuff, awesome!).
75+
1. The browser goes to the DNS server and finds the real address of the server that the website lives on.
76+
2. The browser sends an HTTP request message to the server, asking it to send a copy of the website to the client. This message, and all other data sent between the client and the server, is sent across your internet connection using TCP/IP.
77+
3. If the server approves the client's request, the server sends the client a "200 OK" message, which means "Of course you can look at that website! Here it is", and then starts sending the website's files to the browser as a series of small chunks called [packets](#packets_explained).
78+
4. The browser assembles the small chunks into a complete web page and displays it to you.
7979

8080
## DNS explained
8181

@@ -93,12 +93,17 @@ Let's look up the MDN IP address now, and prove that it points to the same place
9393

9494
## Packets explained
9595

96-
Earlier we used the term "packets" to describe the format in which the data is transferred between the client and server. What do we mean here?
96+
Earlier, we used the term "packets" to describe the format in which the data is transferred between the client and server. What do we mean here?
9797

98-
Basically, when data is sent across the web, it is sent in thousands of small chunks. There are multiple reasons why data is sent in small packets, but most significantly:
98+
When data is sent across the web, it is sent in multiple small chunks called packets. Each packet contains:
9999

100-
- They are sometimes dropped or corrupted and, when this happens, it's quicker and easier to replace small chunks than entire files.
101-
- Additionally, the packets can be routed along different paths, making the exchange faster and allowing many different users to download the same website at the same time. If each website was sent as a single big chunk, only one user could download it at a time, which would make the web very inefficient and not much fun to use.
100+
- A **header**, which includes details such as the server and client IP address, the packet number, the total number of packets in the transmission, and details of the protocols used in the transmission.
101+
- A **payload**, which contains the actual data sent in the packet.
102+
103+
There are multiple reasons why data is sent in small packets, but most significantly:
104+
105+
- They are sometimes dropped or corrupted, and when this happens, it's quicker and easier for the client to request the missing packets rather than an entire file.
106+
- The packets can be routed along different paths, making the transmission as efficient as possible and reducing the possibility of slowing down the network — especially when many users are requesting the same resource simultaneously. The packets may arrive out of sequence, but the client can use the information in the packet headers to make sure they are assembled in the correct order.
102107

103108
## HTTP basics
104109

0 commit comments

Comments
 (0)