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'?
- The protocol, host, optional port, resource path, and query string
- Only the query string and the protocol
- Just the host name and path
- Only the port and path
- The username and password
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?
- It sends a DNS request to a DNS server using UDP
- It closes the application immediately
- It retries using only TCP
- It accesses the resource directly by skipping DNS
- It switches to using HTTP/2 automatically
Choosing the Correct Protocol
What is a major difference between UDP and TCP when used in the network part of the HTTP request lifecycle?
- UDP does not guarantee delivery while TCP does
- UDP requires a handshake, but TCP does not
- TCP cannot be used for web browsing
- UDP is slower than TCP for all web requests
- TCP delivers packets in random order, UDP delivers them in sequence
Handling DNS Server Failovers
If a DNS server cannot resolve a domain name, what does it usually do before returning an error?
- Passes the request to another DNS server (recursively)
- Immediately shuts down
- Tries sending a POST request instead
- Responds with a random IP address
- Increases the TTL value
Caching DNS Results
After a successful DNS response, which information helps the browser decide how long to keep the answer for future requests?
- The cache duration or TTL (Time To Live)
- The HTTP status code
- The size of the resource
- The server uptime
- The number of requests per second