HTTP compression is a technique to reduce data size and improve transfer speed and bandwidth utilization. Compression is implemented on servers and client web browsers.
HTTP data is compressed before it is sent from the server: compliant browsers will announce to the server what methods are supported before downloading the correct format. Browsers which do not support compliant compression method will download uncompressed data.
The most common compression schemes include gzip and Deflate. There are other compression methods like SDCH, Brotli, Xpress, XZ etc.
The web client communicates preferred compression methods using the Accept-Encoding HTTP header. For example: Accept-Encoding: gzip, deflate.
The web server communicates the used compression method with the content encoding header:
For example: Content-Encoding: gzip.