Mastering the HTTP Request Lifecycle: Quick Quiz! Quiz

  1. Understanding Local Processing

    Which part of a URL does a web browser extract to determine the destination server when you type 'http://www.example.com:5000/mainpage?query=param'?

    1. The protocol, host, optional port, resource path, and query string
    2. Only the query string and the protocol
    3. Just the host name and path
    4. Only the port and path
    5. The username and password
  2. What Happens If DNS Caching Fails?

    If a browser cannot find an IP address for a hostname in its cache, what does it do next?

    1. It sends a DNS request to a DNS server using UDP
    2. It closes the application immediately
    3. It retries using only TCP
    4. It accesses the resource directly by skipping DNS
    5. It switches to using HTTP/2 automatically
  3. Choosing the Correct Protocol

    What is a major difference between UDP and TCP when used in the network part of the HTTP request lifecycle?

    1. UDP does not guarantee delivery while TCP does
    2. UDP requires a handshake, but TCP does not
    3. TCP cannot be used for web browsing
    4. UDP is slower than TCP for all web requests
    5. TCP delivers packets in random order, UDP delivers them in sequence
  4. Handling DNS Server Failovers

    If a DNS server cannot resolve a domain name, what does it usually do before returning an error?

    1. Passes the request to another DNS server (recursively)
    2. Immediately shuts down
    3. Tries sending a POST request instead
    4. Responds with a random IP address
    5. Increases the TTL value
  5. Caching DNS Results

    After a successful DNS response, which information helps the browser decide how long to keep the answer for future requests?

    1. The cache duration or TTL (Time To Live)
    2. The HTTP status code
    3. The size of the resource
    4. The server uptime
    5. The number of requests per second