WebKit / standards-positions

WebKit's positions on emerging web specifications
https://webkit.org/standards-positions/
253 stars 21 forks source link

Compression Dictionary Transport #160

Closed pmeenan closed 6 months ago

pmeenan commented 1 year ago

Request for position on an emerging web specification

Information about the specification

Design reviews and vendor positions

Anything else we need to know

Chrome Status Page: https://chromestatus.com/feature/5124977788977152 Example compression gains over Brotli: https://github.com/WICG/compression-dictionary-transport/blob/main/examples.md

It's still very early in the standards process but it will likely span the IETF HTTP working group and WHATWG HTML and Fetch standards and we wanted to bring the relevant parties together sooner rather than later to hash out the designs.

Compression dictionary transport provides a mechanism for websites to use existing resources in their cache as compression dictionaries for future requests. The key points are:

The flow as it currently stands is (generally):

othermaciej commented 1 year ago

Are there any measurements or estimates to quantify the benefit? I couldn’t find any in the Explainer.

pmeenan commented 1 year ago

@othermaciej there is an "examples" doc in the repo that quantifies the benefit for both static resources and HTML. It also includes links to a hosted tool that can run tests on arbitrary resources if you'd like to see how it does in different cases.

In general, 50-90% improvement over Brotli alone is pretty common. The further back in history you go (more changes) the less the gains but even going back a year on a lot of static resources still showed 50+%. On the extreme side the other way, some JS resources with minimal changes were 98% smaller than using brotli alone.

The dynamic cases were tested with search results with wildly different content types or a variety of different e-commerce pages and the gains were largely in the same range (depending on how much page-specific content is included - some with lots of embedded base-64 images were closer to 30% gains).

annevk commented 7 months ago

Apologies for the delay here, we meant to mark this as "position: support", but didn't get around to it. That's assuming issues continue to be resolved in a satisfactory manner and there will be a reasonable Fetch story.

Unless anyone says otherwise I'll make that the position one week from now.