3 ms·
> Moz didn't want to have to "standardize" one specific dictionary You could have multiple sources of dictionary identified by something like a hash, and cache
by pmarreck 3y ago
> Moz didn't want to have to "standardize" one specific dictionary
You could have multiple sources of dictionary identified by something like a hash, and cached in the browser. For example you could have a general-purpose HTML dictionary, a general-purpose CSS dictionary and a general-purpose JS dictionary, have canonical/official versions of these hosted somewhere (say, on Github) and distributed wherever, and update them on a semi regular basis (at the cost of re-compression of the associated data); and in turn these could be overrided on perhaps a site by site basis with site-specific versions of these. You could basically associate an overridable but defaulted dictionary specification by MIME type (or none at all in the case of already-compressed data).
Every file would have to be sent with the hash of the dictionary that was used to start compressing it, which would then be retrieved and cached somehow.
I could see this resulting in some fairly significant byte savings, especially for retrieval of many smaller files.
I bet this would also be useful potentially for email clients/servers.
- jauntywundrkind 3y ago> You could have multiple sources of dictionary identified by something like a hash, and cached in the browser. The browser actually has a very advanced implementation of something like this! They're called urls. The work here is to make it possible to identify dictionaries & retrieve & cache them in the browsers. Mozilla I think smartly avoided creating a spec that requires some variety of centralized governance of what dictionaries to use, like you describe. Whatever the intent of such a community, it creates biases & will have a hard time figuring out what sets of dictionaries are worth creating, for what intents or code bases, and adapting or not as it discovers underserved code bases.