L30. Explain how a web page with 3 local and 3 remote images is downloaded by a web browser using persistent connections with pipelining Flashcards

1
Q

How does a web browser load a web page with images?

A
  1. When the user enters a URL or clicks a link for the web page in the web browser, the browser sends an HTTP GET request to the web server hosting the web page.
  2. The server sends a response containing the requested data, typically in the form of an HTML document.
  3. The HTML document is parsed by the browser to construct the Document Object Model (DOM), a hierarchical representation of the web page structure.
  4. During the parsing process, the browser identifies various resources embedded within the HTML, such as images, scripts, and stylesheets.
  5. For each embedded resource, the browser sends a new HTTP request
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does it mean that an image is local?

A

It is stored on the same server as the web page

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What happens in the transport layer when the browser sends a request?

A

A TCP connection to the server is initiated.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are persistent connections?

A

Persistent connections, introduced in HTTP/1.1, allow multiple requests and responses between a client and server to be sent over a single TCP connection, avoiding the need to repeatedly open and close a connection for each individual request.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the benefits of persistent connections?

A

This reuse of connections significantly reduces latency and minimizes the overhead associated with multiple TCP handshakes, leading to faster loading times and improved overall efficiency.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is HTTP pipelining?

A

A technique that allows a client to send multiple requests for resources in quick succession over a single persistent connection without waiting for each corresponding response.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How does a server respond to pipelined requests?

A

It sends back the responses in the same order the corresponding requests were received.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the benefits of HTTP pipelining?

A

HTTP pipelining enhances download efficiency by reducing the round-trip times (RTTs) compared to making separate requests for each resource, accelerating the overall page loading process.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does it mean that an image is remote?

A

It is stored on a different server than the web page

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How does a browser fetch remote images?

A

It must establish a new TCP connection with each respective server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

When does the browser render the images?

A

The browser starts rendering the images on the web page as it receives the image data from both local and remote servers. Images and other resources are displayed as soon as they are available, rather than waiting for all resources to be fully downloaded, providing a seamless user experience.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How long does a persistent connection stay open?

A

Persistent connections remain open for a short duration (typically defined by the server’s configuration) to allow for any additional requests without the need to establish new connections. Once all resources have been fetched and if there are no further requests, the persistent connections will eventually timeout and close.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What decides the timeout of a persistent connection?

A

The timing is often governed by keep-alive settings on both the client (browser) and server sides.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Why can’t a connection just stay open forever?

A

Because of resource costs of maintaining idle connections.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly