Fetch groups

Not entirely sure who to email about this, so I'm bugging you guys and
www-archive :-)

As far as I know most browsers have a concept of a "fetch group".
Something associated with a document responsible for its resource
management. I wonder if we should make that explicit.

Reasoning:

1) We cannot directly share the Document object with individual
fetches as long term we might want fetching to be happen
off-the-main-thread. For workers this is already the case.

2) A fetch group would allow for shared state among a bunch of
fetches, such as origin, referrer, and CSP policy.

3) If we merge CSP and Fetch by having a CSP parameter to fetch, we
can handle the load images directly from disk if the URL has been
fetched for the Document before via this fetch group. HTML, CSS, SVG,
et al would fetch images using the 'image-src' CSP parameter and the
rest would follow automatically.

4) Lifetime of a Document becomes somewhat more explicit than "fetches
associated with this Document" although this seems one of the lesser
benefits.

Now if we don't want to have fetch groups we need something for the
following instead:

1) A way to load images without hitting the network for known URLs
that can be used across HTML, CSS, SVG, et al.

2) An easy way to identify both the CSP policy in effect for a
particular fetch operation (the Content-Security-Policy header and its
reporting friend) as well as the CSP type (e.g. 'image-src').

Thoughts welcome.


--
http://annevankesteren.nl/

Received on Tuesday, 25 June 2013 14:10:03 UTC