Web · Flashcard
Why must a server that compresses conditionally send Vary: Accept-Encoding?
Why this is the answer
Without it a shared cache can store the Brotli copy and hand it to a client that cannot decode Brotli, which shows up as a corrupted page for a subset of users. Clients do not need permission to vary their request. Preventing recompression is no-transform. And the browser learns to decompress from Content-Encoding, not from Vary.
Read more in the docs