Skip to content

Add Compression Dictionary Transport docs#38722

Merged
wbamberg merged 53 commits intomdn:mainfrom
tunetheweb:shared-compression-dictionaries
Apr 1, 2025
Merged

Add Compression Dictionary Transport docs#38722
wbamberg merged 53 commits intomdn:mainfrom
tunetheweb:shared-compression-dictionaries

Conversation

@tunetheweb
Copy link
Copy Markdown
Contributor

Description

Shared Compression Dictionary is a new standard to allow much smaller resource sizes by reusing either previous resources as dictionaries, or having a separate disctionary.

It is available using Brotli or the newer ZStd compression standards and has been available in Chrome since 130

This PR adds the relevant documentation.

Motivation

This feature is poorly documented at the moment outside of specs and GitHub repos.

Chrome wrote and old blog post on it, but the syntax changed a bit when it was launched:
https://developer.chrome.com/blog/shared-dictionary-compression
Rather then redo that, we'd rather document on MDN and point people from that post to here.

Additional details

https://chromestatus.com/feature/5124977788977152

Related issues and pull requests

BCD updates in mdn/browser-compat-data#26257

@tunetheweb tunetheweb requested review from a team as code owners March 19, 2025 23:19
@tunetheweb tunetheweb requested review from estelle and hamishwillee and removed request for a team March 19, 2025 23:19
@github-actions github-actions bot added Content:HTML Hypertext Markup Language docs Content:HTTP HTTP docs Content:Glossary Glossary entries size/m [PR only] 51-500 LoC changed labels Mar 19, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 19, 2025

Preview URLs (10 pages)
Flaws (3)

Note! 8 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/HTTP/Reference/Headers/Accept-Encoding
Title: Accept-Encoding
Flaw count: 1

  • unknown:
    • No generic content config found

URL: /en-US/docs/Web/HTTP/Reference/Headers/Available-Dictionary
Title: Available-Dictionary
Flaw count: 2

  • macros:
    • Macro produces link /en-US/docs/Glossary/hash which is a redirect
    • Macro produces link /en-US/docs/Glossary/hash which is a redirect
External URLs (7)

URL: /en-US/docs/Glossary/Compression_dictionary_transport
Title: Compression Dictionary Transport


URL: /en-US/docs/Web/HTTP/Guides/Compression
Title: Compression in HTTP


URL: /en-US/docs/Web/HTTP/Guides/Compression_dictionary_transport
Title: Compression Dictionary Transport


URL: /en-US/docs/Web/HTTP/Reference/Headers/Accept-Encoding
Title: Accept-Encoding


URL: /en-US/docs/Web/HTTP/Reference/Headers/Content-Encoding
Title: Content-Encoding

(comment last updated: 2025-04-01 17:41:31)

@wbamberg
Copy link
Copy Markdown
Collaborator

Thanks for contributing these great-looking docs! Would you consider making https://pr38722.review.mdn.allizom.net/en-US/docs/Glossary/Compression_dictionary_transport a guide page under https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides, instead of a glossary page? I think it would be a better fit there.

The sweet spot for glossary pages is things that are:

  • not specific to one tech area (i.e. JS, CSS, HTML, HTTP, ...)
  • a term that needs defining rather than a whole chunk of tech that needs walking through
  • something we can cover in a fairly short page

So the use case for readers is really when they are reading something else and thinking "what does this term mean" and we can explain it relatively quickly and they can get back to what they were reading before.

This looks much more like a usage guide: how to use a set of web platform features to accomplish a thing.

This is a drive-by comment since the PR is already assigned to Hamish and Estelle, but since I have stuck my oar in I am happy to review the whole thing if they would like, or not, if they would prefer that :).

@tunetheweb
Copy link
Copy Markdown
Contributor Author

Done! I was wondering where exactly to put all this guidance, since I agree it was stretching the Glossary beyond it's intent, but also doesn't have a single API to put this. Guides is a perfect place for it.

Copy link
Copy Markdown
Contributor

@pmeenan pmeenan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a few tweaks.

@hamishwillee hamishwillee requested review from wbamberg and removed request for hamishwillee March 20, 2025 20:54
@hamishwillee
Copy link
Copy Markdown
Collaborator

hamishwillee commented Mar 20, 2025

@wbamberg Be my guest. I have unassigned me and assigned you as reviewer. First in best dressed

@tunetheweb tunetheweb requested a review from wbamberg March 29, 2025 09:39
Copy link
Copy Markdown
Collaborator

@wbamberg wbamberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still had a few more comments, sorry! But this is really close.

tunetheweb and others added 9 commits April 1, 2025 07:53
Co-authored-by: wbamberg <will@bootbonnet.ca>
…ndex.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…ndex.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…ndex.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…ndex.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@tunetheweb
Copy link
Copy Markdown
Contributor Author

Thanks again for all your efforts on this @wbamberg ! Let me know if you spot anything else.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@wbamberg wbamberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK this looks great. Thank you for adding these docs, and for your patience with me!

@wbamberg wbamberg merged commit 3b95028 into mdn:main Apr 1, 2025
8 checks passed
cssinate pushed a commit to cssinate/content that referenced this pull request Apr 11, 2025
* Add Compression Dictionary Transport docs

* Move bulk of guidance to Guides

* Apply suggestions from code review

Co-authored-by: Patrick Meenan <patmeenan@gmail.com>

* Review feedback

* Review feedback - expand introduction

* Add more details on format and compression examples

* Tweaks

* Request -> response

* Tweaks

* Code formatting file

* Apply suggestions from code review

Co-authored-by: Patrick Meenan <patmeenan@gmail.com>

* Update files/en-us/web/http/guides/compression_dictionary_transport/index.md

Co-authored-by: Patrick Meenan <patmeenan@gmail.com>

* Update files/en-us/web/http/guides/compression_dictionary_transport/index.md

Co-authored-by: Patrick Meenan <patmeenan@gmail.com>

* Update files/en-us/web/http/guides/compression_dictionary_transport/index.md

Co-authored-by: Patrick Meenan <patmeenan@gmail.com>

* Add Link header example

* Add note about HTTP Cache partitioning

* Apply suggestions from code review

Co-authored-by: wbamberg <will@bootbonnet.ca>

* Update files/en-us/web/http/guides/compression_dictionary_transport/index.md

Co-authored-by: wbamberg <will@bootbonnet.ca>

* Update files/en-us/web/http/guides/compression_dictionary_transport/index.md

Co-authored-by: wbamberg <will@bootbonnet.ca>

* Update files/en-us/web/http/guides/compression_dictionary_transport/index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update files/en-us/web/http/guides/compression_dictionary_transport/index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update files/en-us/web/http/guides/compression_dictionary_transport/index.md

* Update files/en-us/web/http/guides/compression_dictionary_transport/index.md

Co-authored-by: wbamberg <will@bootbonnet.ca>

* Clean up most delta-compressed to dictionary-compressed

* Review feedback

* Add note about SDCH

* Move link to link->rel

* Apply suggestions from code review

Co-authored-by: wbamberg <will@bootbonnet.ca>

* Link rel

* Review feedback

* grammar

* Apply suggestions from code review

Co-authored-by: wbamberg <will@bootbonnet.ca>

* Update files/en-us/web/http/guides/compression_dictionary_transport/index.md

* Update files/en-us/web/http/guides/compression_dictionary_transport/index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update files/en-us/web/http/guides/compression_dictionary_transport/index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update files/en-us/web/http/guides/compression_dictionary_transport/index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update files/en-us/web/http/guides/compression_dictionary_transport/index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Linter broke things

* Add back incorrectly removed identity

* Update files/en-us/web/http/reference/headers/content-encoding/index.md

* Update files/en-us/web/http/reference/headers/content-encoding/index.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update files/en-us/web/http/guides/compression_dictionary_transport/index.md

---------

Co-authored-by: Patrick Meenan <patmeenan@gmail.com>
Co-authored-by: wbamberg <will@bootbonnet.ca>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:Glossary Glossary entries Content:HTML Hypertext Markup Language docs Content:HTTP HTTP docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants