4 ms·
> I believe HTTP2 has header compression (RFC 7541)[1] with 'static tables', which seems to be a form of dictionary, but surprisingly to me no html compression
by WorldMaker 4y ago
> I believe HTTP2 has header compression (RFC 7541)[1] with 'static tables', which seems to be a form of dictionary, but surprisingly to me no html compression with such shared dictionaries.
To my understanding, that static table in HTTP2 is directly in context of recommending and discussing Brotli compression, which does use a table like that as a standard static dictionary in HTTP2+ scenarios including other static dictionary inclusions derived from a corpus of HTML documents.
https://en.wikipedia.org/wiki/Brotli https://en.wikipedia.org/wiki/Brotli
- gnramires 4y agoThanks, I didn't know Brotli! Indeed it seems to include a dictionary in its compression which seems to help significantly with small pages. I hope compression continues to improve in this way. > To my understanding, that static table in HTTP2 is directly in context of recommending and discussing Brotli compression It seems separate, that would be a header compression for HTTP2 header itself, while Brotli encodes content (usually html, css or js).
- robryk 4y agoThe header compression in http2 has atypical requirements placed upon it: contents of different headers in a single request must not impact each other's compressed size[^], lest an attacker able to manipulate one of them can use that to guess the other. Thus, LZ77-style compression is out of the window, as well as using Huffman codes selected based on _all_ the header values. In essence, each header value (in a single request) has to be compressed independently. IIUC the dictionary you reference is used for header keys (as opposed to values). [^] this statement is a bit of a lie for reasons of simplification