Re: [whatwg/fetch] preload, destinations, and module scripts (#486)

@annevk - I think that varies based on the option we would choose to take.

Current preload implementation (and spec's spirit, despite processing model omissions that @domenic pointed out) treats `type` (and `media`) as a "barrier" before fetching the resource. If `type` is an unsupported media type, the resource should never be fetched. As such, I'm not sure how `type` should be translated to `fetch()`, but maybe we're missing a "does this mime type work for this resource type" primitive.

In the (2) option @domenic is proposing, `type` would have an impact on the resource fetching behavior (it will enable us to change the type of script we're fetching, which can impact ability to ahead-of-time processing, preloading dependencies, etc). That would mean that `type` should be piped into `fetch()` in these cases, but not necessarily in others (e.g. fonts and images, which use type to determine "do I preload this at all?")

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/486#issuecomment-278893299

Received on Friday, 10 February 2017 09:10:09 UTC