Question 61
HardA browser resolves www.example.com with an empty cache. Which servers are queried, in order, during iterative resolution by the local resolver?
- A.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Computer Networks
A browser resolves www.example.com with an empty cache. Which servers are queried, in order, during iterative resolution by the local resolver?
The web server itself
The .com server, then a root server
The authoritative server only
A root server, then the .com TLD server, then example.com's authoritative server
Sign up free to see the answer and a step-by-step explanation.
Why does DNS normally use UDP but switch to TCP for some queries?
Root servers only accept TCP
UDP can't carry names
Responses too large for a UDP message (or zone transfers) use TCP
TCP is always faster
Sign up free to see the answer and a step-by-step explanation.
A DNS record has a TTL of 3,600 s. The site moves to a new IP address. What is the longest a resolver might keep sending users to the old address?
Forever
About an hour
About a second
A day
Sign up free to see the answer and a step-by-step explanation.
What does an HTTP 302 response tell the browser?
The resource has moved permanently
The request succeeded
Access is forbidden
The resource is temporarily at another URL given in the Location header
Sign up free to see the answer and a step-by-step explanation.
Which HTTP status code does a server return when a client exceeds a rate limit?
429 Too Many Requests
500 Internal Server Error
403 Forbidden
404 Not Found
Sign up free to see the answer and a step-by-step explanation.
A browser sends If-None-Match with an ETag. What does a 304 reply mean?
The ETag is invalid
The resource was deleted
The server crashed
The cached copy is still current, so no body is sent
Sign up free to see the answer and a step-by-step explanation.
Which HTTP methods are idempotent? (Select all that apply.)
PUT
DELETE
POST
PATCH (in general)
Sign up free to see the answer and a step-by-step explanation.
What is the main improvement of HTTP/2 over HTTP/1.1?
It removes TLS
It uses UDP
Many requests and responses are multiplexed over one connection, with compressed headers
It allows only one request per connection
Sign up free to see the answer and a step-by-step explanation.
What is a CORS preflight request?
A TCP handshake
A cache check
An OPTIONS request a browser sends to ask a server whether a cross-origin request is allowed
A DNS lookup
Sign up free to see the answer and a step-by-step explanation.
What does the Set-Cookie attribute HttpOnly do?
Sends the cookie only over HTTP
Makes the cookie public
Prevents JavaScript from reading the cookie, reducing the damage of XSS
Deletes the cookie
Sign up free to see the answer and a step-by-step explanation.