bruant.d at gmail.com
Thu Oct 10 11:22:43 PDT 2013
HTTP 2 is coming with a feature called server-push  which seems more
appropriate for this type of bundling.
In essence, when being asked for a webpage, the server sends the HTML
page as well as a bunch of resources (CSS, JS, image, whatever) in the
same HTTP response. These are individually decompressed and cached and
available handy when the HTML parsing requires fetching resources (lots
of that can happen in parallel I imagine, depending on the bundling).
Best of all, this is all seamless. Just keep writing HTML as you've
always had, no need for new "assets.zip$/lib/main.js" syntax. It keeps
the HTML decoupled from the "how" of resource delivery.
Among other benefits :
"pushed resources are cached individually by the browser and can be
reused across many pages"
=> It's not clear this can happen with an asset.zip
"by the time the browser discovers the script tag in the HTML response
the |main.js| file is already in cache, and no extra network roundtrips
=> Not even a need to load an additional asset.zip
We can discuss the deployment aspects of HTTP 2 and whether Generic
Bundling as proposed can provide benefits before HTTP 2 is fully
deployed, but I feel the bottleneck will be the server-side engineering
to bundle the resources and this work is equivalent for both HTTP 2 and
the proposed Generic Bundling.
So HTTP 2 wins?
Le 10/10/2013 19:30, Jonathan Bond-Caron a écrit :
> About Generic Bundling in:
> <script src="assets.zip$/lib/main.js"></script>
> It could be reworked as:
> <link rel="loader" type="application/zip" href="assets.zip">
> <script src="lib/main.js"></script>
> Simple pattern for packaging web apps where 'assets.zip' might be
> already available.
> For remote fetching, I imagine it would block waiting for assets.zip
> to be available. Could be solved with something like:
> <script src="lib/main.js" ref="assets.zip"></script>
> Which would lookup <link rel="loader"> and match ref=assets.zip to
> Either way, I'm curious where the discussion is taking place, w3c?
> How does this fit with Ecmascript, System.loader?
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss