Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explain that Chrome requests to the web server should be made in Inco… #3753

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/ch20-01-single-threaded.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,13 @@ reason might be that the browser is making a request for the page as well as a
request for other resources, like the *favicon.ico* icon that appears in the
browser tab.

Another reason might be that the browser is opening multiple connections to the
server in anticipation of future requests. By opening connections early, the
browser begins connection setup tasks ahead of time. Once the connection is
established, the next request to the server can be sent without delay. Disable
this optimization in Chrome by using Incognito mode, or else it could make the
server panic in later sections.

It could also be that the browser is trying to connect to the server multiple
times because the server isn’t responding with any data. When `stream` goes out
of scope and is dropped at the end of the loop, the connection is closed as
Expand Down