That's the best way to think of it: if you receive a request or response with a content-encoding header, then you should undo that content encoding (e.g. un-gzip the body) and then you'll find content that matches the content-type header. You could also use it to describe a layer of encryption around the content though (for unusual environments where HTTPS isn't sufficient/possible) or to send content encoded in a format that's more easily compatible with other infrastructure (encoding it as base64 rather than raw binary data, for example). All modern browsers and HTTP clients will support compressed content in some form though, and you can detect this automatically using the Accept-Encoding opens in a new tab header in incoming requests.