mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
Feedback on the Fetch spec additions #202
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yoavweiss on GitHub (Nov 17, 2017).
I'd like to provide some preliminary feedback on the Fetch spec patch.
First of all, thanks for working on Shared Brotli! I'm super excited about the possibilities :)
High level comments:
Practical comments:
recursive-sbrare not clear. IIUC, that's used to update a dictionary from a previous dictionary. If so, why isAccept-encoding: sbrforbidden? How does the server know to provide an sbr resource in this case?@lvandeve commented on GitHub (Nov 17, 2017):
Thank you very much Yoav, that's super helpful!
The focus of this fetch spec is indeed on browser implementation, but the concept is not supposed to be irrelevant for other clients.
About publishing dictionaries: indeed the client does not tell the server which it has, instead the server provides the URL of the dictionary, and the client caches it. This is good when the client then requests other pages which use the same dictionary.
When using a previous document as dictionary for a next document, the server should know that the client already has this previous document since it sent it before during this session. Does the latter sound feasible?
About recursive-sbr: the dictionary itself can be compressed with for example
br. This is to prevent dictionaries fetching other dictionaries fetching other dictionaries and so on. Good point about updating dictionary from other dictionary though. Maybe it makes more sense to allow some recursion but limit the depth.@yoavweiss commented on GitHub (Nov 21, 2017):
That seems like something that will be hard to deploy. The server has to keep track of all past resources and their client side cacheability in order to know which dictionary to use. (Maybe Cache Digests can help a bit here...) It also seems like something that will result in breakage if the server and the client caches ever get out of sync.
Even on the same connection, use of URLs would mean that the browser would have to get the resources from the disk cache in order to use them as dictionaries. What happens when they are not cacheable?
@lvandeve commented on GitHub (Nov 24, 2017):
The current design indeed tries to reuse the existing caching mechanism, the advantage is that it makes implementation simpler by reusing existing features. The alternative is to specify a new kind of cache (because no matter what, you must specify in some way that the client must keep the data somewhere, correct me if I'm wrong) with more strict requirements for keeping the data.
If the existing caching mechanism is used, the penalty when something is not properly cached, is that it will be requested by URL instead, so the compression benefit is gone. Ideally web servers would use a unique URL for every different resource that can be used as dictionary.
Any feedback on this is welcome