Compare Revisions
Compression in HTTP
Revision 1109435:
Revision 1109435 by teoli on
Revision 1109437:
Revision 1109437 by teoli on
- Title:
- Compression in HTTP
- Compression in HTTP
- Slug:
- Web/HTTP/Compression
- Web/HTTP/Compression
- Tags:
- "Content Negotiation" "Guide" "HTTP"
- "Content Negotiation" "Guide" "HTTP"
- Content:
-
Revision 1109435 Revision 1109437 n 71 Hop-by-hop compression, though similar to end-to-end compre n 71 Hop-by-hop compression, though similar to end-to-end compre > ssion, differs by one fundamental element: the compression doesn' > ssion, differs by one fundamental element: the compression doesn' > t happen on the resource in the server, creating a specific repre > t happen on the resource in the server, creating a specific repre > sentation that is then transmitted, but on the body of the messag > sentation that is then transmitted, but on the body of the messag > e between any two nodes on the path between the client and the se > e between any two nodes on the path between the client and the se > rver. > rver. Connections between successive intermediate nodes may apply > a <em>different</em> compression. t 74 t 74 (image) 75 </p> 76 <p> 77 To do this, HTTP uses a mechanism similar to the content ne > gotiation for end-to-end compression: the node transmitting the r > equest advertize its will using the {{HTTPHeader("TE")}} and the > other node chooses the adequate method, applies it, and indicates > its choice with the {{HTTPHeader("Transfer-Encoding")}} request. 78 </p> 79 <p> 80 (image) 81 </p> 82 <p> 83 In practice, hop-by-hop compression is transparent for the > server and the client, and is rarely used. {{HTTPHeader("TE")}} a > nd {{HTTPHeader("Transfer-Encoding")}} are mostly used to send a > response by chunks, allowing to start transmitting a resource wit > hout knowing its length.