Intent to Experiment: Compression dictionary transport with Shared Brotli

781 views
Skip to first unread message

Tsuyoshi Horo

unread,
Jul 25, 2023, 9:52:38 PM7/25/23
to blink-dev, Patrick Meenan, Yoav Weiss, kenji...@chromium.org, Daisuke Enomoto

Contact emails

ho...@chromium.orgpme...@chromium.orgyoav...@chromium.orgkenji...@chromium.org

Explainer

https://github.com/WICG/compression-dictionary-transport

Specification

https://github.com/WICG/compression-dictionary-transport

Design docs


https://docs.google.com/document/d/1IcRHLv-e9boECgPA5J4t8NDv9FPHDGgn0C12kfBgANg/edit
https://github.com/WICG/compression-dictionary-transport
https://datatracker.ietf.org/doc/draft-meenan-httpbis-compression-dictionary

Summary

This feature adds support for using designated previous responses, as an external dictionary for Brotli-compressing HTTP responses.



Blink component

Blink>Network

TAG review

https://github.com/w3ctag/design-reviews/issues/877

TAG review status

Pending

Risks



Interoperability and Compatibility

Interoperability and Compatibility risk are low. This feature introduces a new compression method for transporting resources over HTTP. Web sites can know the browser support for the new feature by checking `document.createElement('link').relList.supports('dictionary')`. Also web servers can know the browser support by checking the `Accept-Encoding` request header and the new `Use-As-Dictionary` request header. This feature is an opt-in feature. And the dictionary storage is isolated using the top level site and the frame origin as the key. That means, if there is no dictionary registered for the site, the behavior of Chrome will not change while browsing the site. Also this feature is usable only on secure-context. So this feature will not increase the risk of non-supporting network proxies misunderstanding the content’s encoding.



Gecko: Positive (https://github.com/mozilla/standards-positions/issues/771)

WebKit: No signal (https://github.com/WebKit/standards-positions/issues/160)

Web developers: No signals

Other signals:

Ergonomics

To reduce memory usage in network services, dictionary metadata is stored in a database on disk. And to avoid performance degradation for normal requests that do not use a dictionary, the reading of this metadata is designed not to block network requests. In other words, if the reading of metadata from the database is not completed before the request header is ready to be sent to the server, the dictionary may not be used even if it is already registered in the database.



Activation

To adopt this feature, web developers need to make changes in their web servers. Currently there is no major server softwares which supports compression dictionaries.



Security

Chrome registers the response as a dictionary only when the response is CORS-readable from the document origin. Also we use a registered dictionary to decompress the response only when the response is CORS-readable from the document origin. Additionally, the dictionary and the compressed resource are required to be from the same origin as each other. So this should not introduce any new attack vector of stealing information. The dictionaries are partitioned with the storage cache and are cleared whenever cookies or cache is cleared to ensure that the dictionaries can not be abused as a tracking vector.



WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?



Goals for experimentation

We would like to collect feedback on the Compression Dictionary Transport feature of API design. We would also like to run some experiments using this feature to measure its performance impact.

Ongoing technical constraints

None



Debuggability

We have introduced chrome://net-internals/#sharedDictionary. Using it, web developers can manage the registered dictionaries. Also web developers can check the related HTTP request and response headers (Use-As-Dictionary, Sec-Available-Dictionary, Accept-Encoding, Content-Encoding) using DevTools' Network tab.



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests?

No. We will rewrite some browser_tests to WPT.



Flag name on chrome://flags

chrome://flags/#enable-compression-dictionary-transport-backend chrome://flags/#enable-compression-dictionary-transport

Finch feature name

CompressionDictionaryTransportBackend CompressionDictionaryTransport

Requires code in //chrome?

True

Tracking bug

https://crbug.com/1413922

Launch bug

https://launch.corp.google.com/launch/4266286

Estimated milestones

OriginTrial desktop last122
OriginTrial desktop first117
OriginTrial Android last122
OriginTrial Android first117


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5124977788977152

Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADk0S-Vb1ON2XT2%2BBP27tJ4ivjgyu63jcd667am4TwcVFGsbuw%40mail.gmail.com

This intent message was generated by Chrome Platform Status.

Mike Taylor

unread,
Jul 26, 2023, 11:29:35 AM7/26/23
to Tsuyoshi Horo, blink-dev, Patrick Meenan, Yoav Weiss, kenji...@chromium.org, Daisuke Enomoto

LGTM to experiment from 117 to 122 inclusive. 

(Good luck, looks cool!)

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADk0S-WyukWVPpFMFYSWVZ1%2BOuXVjtNfWiCqKvDYcdRwaApZLA%40mail.gmail.com.

Tsuyoshi Horo

unread,
Aug 4, 2023, 12:23:13 AM8/4/23
to blink-dev, Patrick Meenan, Yoav Weiss, kenji...@chromium.org, Daisuke Enomoto, Mike Taylor
Hi, blink-dev@ members.

The origin trial for the new CompressionDictionaryTransport feature is now available in the Origin Trial console at:
https://developer.chrome.com/origintrials/

We have also published a document that provides more information about the feature and how to participate in the trial. The document can be found here:
https://chromium.googlesource.com/chromium/src/+/main/docs/experiments/compression-dictionary-transport.md

We hope this information is helpful. Please let us know if you have any questions.

Thanks.

Alex Russell

unread,
Sep 26, 2023, 1:17:49 PM9/26/23
to blink-dev, Tsuyoshi Horo, Patrick Meenan, Yoav Weiss, Kenji Baheux, deno...@google.com, Mike Taylor
Hey folks,

Glad to see there's excitement around the OT; was wondering if there has been any work to extend Compression Streams for zstd as part of this effort? I don't see it in the explainer, and it would be great for us not to be adding new ecodings that aren't also exposed to userland.

Best,

Alex

On Thursday, August 3, 2023 at 9:23:13 PM UTC-7 Tsuyoshi Horo wrote:
Hi, blink-dev@ members.

The origin trial for the new CompressionDictionaryTransport feature is now available in the Origin Trial console at:
https://developer.chrome.com/origintrials/

We have also published a document that provides more information about the feature and how to participate in the trial. The document can be found here:
https://chromium.googlesource.com/chromium/src/+/main/docs/experiments/compression-dictionary-transport.md

We hope this information is helpful. Please let us know if you have any questions.

Thanks.
On Thu, Jul 27, 2023 at 12:29 AM Mike Taylor <mike...@chromium.org> wrote:

LGTM to experiment from 117 to 122 inclusive. 

(Good luck, looks cool!)

On 7/25/23 9:52 PM, Tsuyoshi Horo wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Patrick Meenan

unread,
Sep 26, 2023, 1:54:27 PM9/26/23
to Alex Russell, blink-dev, Tsuyoshi Horo, Yoav Weiss, Kenji Baheux, deno...@google.com, Mike Taylor
We had put the compression stream API out of scope for the dictionary work because the dictionaries would require a different constructor that allows for specifying the dictionary bytes (or stream). That's independent of supporting zstd and br on the compression streams API itself though (which would be necessary to add dictionary support).

On Tue, Sep 26, 2023 at 1:17 PM Alex Russell <sligh...@chromium.org> wrote:
Hey folks,

Glad to see there's excitement around the OT; was wondering if there has been any work to extend Compression Streams for zstd as part of this effort? I don't see it in the explainer, and it would be great for us not to be adding new ecodings that aren't also exposed to userland.

Best,

Alex

On Thursday, August 3, 2023 at 9:23:13 PM UTC-7 Tsuyoshi Horo wrote:
Hi, blink-dev@ members.

The origin trial for the new CompressionDictionaryTransport feature is now available in the Origin Trial console at:
https://developer.chrome.com/origintrials/

We have also published a document that provides more information about the feature and how to participate in the trial. The document can be found here:
https://chromium.googlesource.com/chromium/src/+/main/docs/experiments/compression-dictionary-transport.md

We hope this information is helpful. Please let us know if you have any questions.

Thanks.
On Thu, Jul 27, 2023 at 12:29 AM Mike Taylor <mike...@chromium.org> wrote:

LGTM to experiment from 117 to 122 inclusive. 

(Good luck, looks cool!)

On 7/25/23 9:52 PM, Tsuyoshi Horo wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Patrick Meenan

unread,
Sep 26, 2023, 5:26:54 PM9/26/23
to Alex Russell, blink-dev, Tsuyoshi Horo, Yoav Weiss, Kenji Baheux, deno...@google.com, Mike Taylor
It's probably also worth noting that adding encodings to the compression streams API would require browsers to bundle the compression code for the relevant encodings (where they only pull in the decompression code for network-level content encodings).

Not saying the discussions shouldn't happen, just that they are separate discussions that should have the appropriate use cases and justifications laid out.

Tsuyoshi Horo

unread,
Oct 16, 2023, 10:04:44 PM10/16/23
to blink-dev, Alex Russell, Yoav Weiss, Kenji Baheux, deno...@google.com, Mike Taylor, Patrick Meenan
Hi, blink-dev

We recently discovered a critical issue in the compression dictionary transport feature. As a result, we disabled the feature several days ago. This means that Origin Trial tokens for the feature will not work on the current Chrome Stable version.

We have since fixed the bug and re-enabled the feature in Chrome 119.0.6045.29. Origin Trial tokens will work on Chrome Stable 119 and later, which will be released on October 31, 2023.

We apologize for any inconvenience this may cause.

Thank you for your understanding.
Reply all
Reply to author
Forward
0 new messages