HTTP Headers
Dictionary-ID header
The HTTP Dictionary-ID request header points to a dictionary used by Compression Dictionary Transport for compressing server responses.
A server signals that a resource can act as a dictionary by including the Use-As-Dictionary header in its response. Within this header, the server can specify an id directive, which assigns an identifier to that dictionary. If an ID is assigned, subsequent browser requests for resources compressible with that dictionary must contain the Dictionary-ID header, and its value must correspond to the ID set in Use-As-Dictionary.
This mechanism allows the server to easily pinpoint a dictionary using an arbitrary identifier, avoiding the need to use the dictionary’s hash as the sole key. Relying on hashes would force the server to compute a hash for every response containing the Use-As-Dictionary header, in case the resource later becomes a dictionary.
For further details, consult the Compression Dictionary Transport guide.
Syntax
Dictionary-ID: "<string-identifier>"Directives
<string-identifier>- A string representing the dictionary’s server-assigned ID.
Example
For instance, imagine the server has sent a Use-As-Dictionary header containing an id="dictionary-12345" directive:
Use-As-Dictionary: match="/js/app.*.js", id="dictionary-12345"
When the client requests a matching resource, it will include this id value in a Dictionary-ID header:
Accept-Encoding: gzip, br, zstd, dcb, dcz
Available-Dictionary: :pZGm1Av0IEBKARczz7exkNYsZb8LzaMrV7J32a2fFG4=:
Dictionary-ID: "dictionary-12345"
How to Modify Header using Requestly
Requestly is a powerful Chrome extension that allows you to modify HTTP headers, including the Dictionary-ID header. This is useful when testing shared dictionary compression workflows, where the client and server coordinate using a specific compression dictionary during development or debugging. Steps to Modify the Dictionary-ID Header:
- Install and open the Requestly Chrome extension. You can find it on the Chrome Web Store.
- Create a new rule: Click on “Create Rule” and choose “Modify Headers” from the list of available rule types.
- Add a new header modification:
- Under “Action”, select “Add” or “Override”.
- In the “Header Name” field, enter Dictionary-ID.
- In the “Header Value” field, enter the identifier of the compression dictionary you want to test (for example, example-dictionary-v1).
- Set the URL condition: Specify the URL or pattern where this header should apply (for example, https://your-api.com/*).
- Save the rule.
Once configured, Requestly will inject the Dictionary-ID header into all matching requests. This allows you to simulate clients referencing a specific shared compression dictionary.
You might need to modify the Dictionary-ID header to test how your server handles shared dictionary compression, validate compatibility between client and server, or debug performance optimizations related to compressed responses without changing your production setup.
Table of Contents
- No headings found.





