Revision 936807 of Content-Encoding

  • Revision slug: Web/HTTP/Headers/Content-Encoding
  • Revision title: Content-Encoding
  • Revision id: 936807
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

The Content-Encoding header indicates which algorithm is been used for this message.

Valid values for the Content-Encoding header include:

Value Meaning Standard
gzip

A format using the Lempel-Ziv coding (LZ77), with a 32-bit CRC. This is originally the format of the UNIX gzip program. The HTTP/1.1 standard also recommends that the servers supporting this content-encoding should recognize x-gzip as an alias, for compatibility purposes.

RFC 1952
compress A format using the Lempel-Ziv-Welch (LZW) algorithm. The value name was taken from the UNIX compress program, which implemented this algorithm.
Like the compress program, which has disappeared from most UNIX distributions, this content-encoding is used by almost no browsers today, partly because of a patent issue (which expired in 2003).
HTTP/1.1
deflate Using the zlib structure (defined in RFC 1950), with the deflate compression algorithm (defined in RFC 1951). RFC 1950 and RFC 1951
identity Indicates the identity function (i.e. no compression, nor modification). This token, except if explicitly specified, is always deemed acceptable. HTTP/1.1
br A format using the Brotli algorithm Experimental

 

Revision Source

<p>The <strong><code>Content-Encoding</code></strong> header indicates which algorithm is been used for this message.</p>

<p>Valid values for the <code>Content-Encoding</code> header include:</p>

<table align="left" class="standard-table">
 <tbody>
  <tr>
   <th>Value</th>
   <th>Meaning</th>
   <th>Standard</th>
  </tr>
  <tr>
   <td><code>gzip</code></td>
   <td>
    <p>A format using the <a class="external" href="http://en.wikipedia.org/wiki/LZ77_and_LZ78#LZ77" title="http://en.wikipedia.org/wiki/LZ77_and_LZ78#LZ77">Lempel-Ziv coding</a> (LZ77), with a 32-bit CRC. This is originally the format of the UNIX <em>gzip</em> program. The HTTP/1.1 standard also recommends that the servers supporting this content-encoding should recognize <code>x-gzip</code> as an alias, for compatibility purposes.</p>
   </td>
   <td><a class="external" href="http://tools.ietf.org/html/rfc1952" title="http://tools.ietf.org/html/rfc1952">RFC 1952</a></td>
  </tr>
  <tr>
   <td><code>compress</code></td>
   <td>A format using the <a class="external" href="http://en.wikipedia.org/wiki/LZW" title="http://en.wikipedia.org/wiki/LZW">Lempel-Ziv-Welch</a> (LZW) algorithm. The value name was taken from the UNIX <em>compress</em> program, which implemented this algorithm.<br />
    Like the compress program, which has disappeared from most UNIX distributions, this content-encoding is used by almost no browsers today, partly because of a patent issue (which expired in 2003).</td>
   <td>HTTP/1.1</td>
  </tr>
  <tr>
   <td><code>deflate</code></td>
   <td>Using the <a class="external" href="http://en.wikipedia.org/wiki/Zlib" title="http://en.wikipedia.org/wiki/Zlib">zlib</a> structure (defined in <a class="external" href="http://tools.ietf.org/html/rfc1950" title="http://tools.ietf.org/html/rfc1950">RFC 1950</a>), with the <a class="external" href="http://en.wikipedia.org/wiki/DEFLATE" title="http://en.wikipedia.org/wiki/DEFLATE"><em>deflate</em></a> compression algorithm (defined in <a class="external" href="http://tools.ietf.org/html/rfc1952" title="http://tools.ietf.org/html/rfc1952">RFC 1951</a>).</td>
   <td><a class="external" href="http://tools.ietf.org/html/rfc1950" title="http://tools.ietf.org/html/rfc1950">RFC 1950</a> and <a class="external" href="http://tools.ietf.org/html/rfc1951" title="http://tools.ietf.org/html/rfc1951">RFC 1951</a></td>
  </tr>
  <tr>
   <td><code>identity</code></td>
   <td>Indicates the identity function (i.e. no compression, nor modification). This token, except if explicitly specified, is always deemed acceptable.</td>
   <td>HTTP/1.1</td>
  </tr>
  <tr>
   <td><code>br</code></td>
   <td>A format using the <a href="https://en.wikipedia.org/wiki/Brotli">Brotli</a> algorithm</td>
   <td><em>Experimental</em></td>
  </tr>
 </tbody>
</table>

<p>&nbsp;</p>
Revert to this revision