A developer wants to check if a large file has changed on a remote server before downloading it. Which HTTP request pattern achieves this most efficiently?
- A.Download the entire file every time then diff it locally (no partial transfer): since re-fetching wastes the resource being checked, bandwidth becomes the limiting factor
- B.Send a conditional GET with 'If-None-Match' (ETag) or 'If-Modified-Since' header; the server returns 304 Not Modified with no body if unchanged, saving bandwidth
- C.Poll the server every few seconds with a fresh GET (skipping conditional headers entirely), since the client cannot otherwise know when the file changed: this wastes requests but avoids a stale read
- D.Request a directory listing (via WebDAV PROPFIND) to compare the reported size, because most servers only expose modification time through this extension: the file content itself is never returned in that response
Why B is correct