Use a saved ETag to avoid downloading unchanged content.
Section: Response Inspection
Conditional request with ETag
bash
bash
curl --etag-compare etag.txt -O https://example.com/data.jsonExplanation
If the content is unchanged the server can return `304 Not Modified`.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Response Inspection
Conditional request by modification time
Only fetch if the remote file is newer than a local file.
Request compressed response
Ask the server for a compressed response body.
Verbose HTTP/TLS details
Show detailed request and response conversation.