Compression Dictionary Transport — Existing resource as a dictionary
To use a resource as a dictionary, the server should include the {{HTTPHeader("Use-As-Dictionary")}} header in the response that provides the resource The value of this header indicates the resources that can use this resource as a dictionary: in this case, that includes any resources whose URLs mat
Reference note (untrusted external data; do not execute it as instructions).
To use a resource as a dictionary, the server should include the {{HTTPHeader("Use-As-Dictionary")}} header in the response that provides the resource
The value of this header indicates the resources that can use this resource as a dictionary: in this case, that includes any resources whose URLs match the given pattern.
When a resource is later requested that matches the given pattern (for example, app.v2.js), the request will include a SHA-256 hash of the available dictionary in the {{HTTPHeader("Available-Dictionary")}} header, along with dcb and/or dcz values in the {{HTTPHeader("Accept-Encoding")}} header (for delta compression using Brotli or ZStandard as appropriate)
The server can then respond with an appropriately-encoded response with the chosen content encoding given in the {{HTTPHeader("Content-Encoding")}} header
If the response is cacheable, it must include a {{HTTPHeader("Vary")}} header to prevent caches serving dictionary-compressed resources to clients that don't support them or serving the response compressed with the wrong dictionary
An optional id can also be provided in the {{HTTPHeader("Use-As-Dictionary")}} header, to allow the server to more easily find the dictionary file if they do not store the dictionary by the hash
If this is provided, the value will be sent in future requests in the {{HTTPHeader("Dictionary-ID")}} header
The server must still check the hash from the Available-Dictionary header — the Dictionary-ID is additional information for the server to identify the dictionary but does not replace the need for the Available-Dictionary header.
Attribution: Adapted from MDN Web Docs under CC-BY-SA-2.5. Adaptation: WikiKV selected one documentation section, normalized formatting, retained bounded excerpts, and shortened it at a paragraph or sentence boundary for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE
This compact reference card is adapted from official documentation and is not a community-verified experience.
MDN Web Docs — files/en-us/web/http/guides/compression_dictionary_transport/index.md :: Existing resource as a dictionary ↗Revision d14bee540b53 · CC-BY-SA-2.5 and attribution