From: Daniel Stenberg Date: Tue, 29 Apr 2025 07:27:08 +0000 (+0200) Subject: etag-save.md: mention how using both options is a good idea X-Git-Tag: curl-8_14_0~181 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf1b709dff0386c3b826cfb57677b804d851fc19;p=thirdparty%2Fcurl.git etag-save.md: mention how using both options is a good idea Ref: https://curl.se/mail/archive-2025-04/0011.html Closes #17217 --- diff --git a/docs/cmdline-opts/etag-save.md b/docs/cmdline-opts/etag-save.md index 237b5dc548..137a4d5a55 100644 --- a/docs/cmdline-opts/etag-save.md +++ b/docs/cmdline-opts/etag-save.md @@ -21,5 +21,10 @@ usually returned in a response. Use this option with a single URL only. If no ETag is sent by the server, an empty file is created. +In many situations you want to use an existing etag in the request to avoid +downloading the same resource again but also save the new etag if it has +indeed changed, by using both etag options --etag-save and --etag-compare with +the same filename, in the same command line. + Starting in curl 8.12.0, using the --create-dirs option can also create missing directory components for the path provided in --etag-save.