A server responds with 'Content-Encoding: br'. What compression algorithm does this indicate, and what is its advantage over 'Content-Encoding: gzip'?
- A.'br' stands for 'binary response' - an HTTP/2-specific binary framing format
- B.'br' is an alias for 'deflate' defined in RFC 7932
- C.'br' stands for 'buffered response' and delays delivery until the entire response is compressed
- D.'br' indicates Brotli compression, developed by Google; it typically achieves 15-25% better compression ratios than gzip for text-based web content, with similar or better decompression speed in modern browsers
Why D is correct
Content-Encoding: br indicates Brotli compression (RFC 7932). Brotli uses a pre-defined dictionary of common web content patterns, achieving better compression than gzip for HTML, CSS, and JavaScript - especially for smaller files where gzip's per-file overhead is significant. Brotli is supported by all modern browsers. A client signals support via Accept-Encoding: br, gzip. Security consideration: Content-Encoding must be stripped by proxies before modifying the body; improper handling of unrecognized encodings can lead to content integrity issues.
Know someone studying for Web App Fundamentals? Send them this one.