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

To follow up on the above, I just wanted to illustrate here very briefly my exact argument, to be sure that nothing is being missed. The ideal optimization workflow I'd like to see for modules would be simply inlining the flat preloading and integrity information as a production optimization step:

```html
<link rel="preload" href="/module-dep.js" integrity="..." />
<link rel="preload" href="/module-deep-dep.js" integrity="..." />
<script type="module" src="/module.js" integrity="..."></script>
```

1. The above gives a flat preload on the first load, allowing all deep modules to be loaded in a single latency.
2. When only some of the modules in the tree are cached, the above ensures that only the modules that are needed are fetched, again with a single latency.
3. Being able to supply subresource integrity at the same time as this deep dependency hinting would allow solving two problems at the same time.

I understand there are a lot of spec concerns here to do with the exact mechanics, but the overall workflow in the above is what I'd really love to see.

-- 
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-328186828

Received on Friday, 8 September 2017 18:57:56 UTC