Generic Bundling

Jorge Chamorro jorge at jorgechamorro.com
Fri Oct 11 06:39:24 PDT 2013


On 11/10/2013, at 13:23, David Bruant wrote:
> Le 11/10/2013 12:46, Jorge Chamorro a écrit :
>> On 11/10/2013, at 12:02, David Bruant wrote:
>> 
>>> Providing a zip in the manifest file could work, but I'm not sure I see the benefit over individual files. Disk fragmentation issues maybe?
>> One benefit is that a single .zip can fetch a bunch of files in a single network round trip.
> The manifest file was in response to Andrea's point about packaged app (where he pointed that network requests aren't the only use case), so network round trips don't apply.
> 
>> Another is than once the .zip has been unzipped, its files can be accessed synchronously.
> If we're back on the network use case, server push has the same benefits (resource bundling and in-memory availability)... and saves a network round-trip since the resources come along!

I've read/seen the links you've posted now, thank you.

HTTP2.0 is awesome, but it requires resource planning a priori, and the cooperation of the server, and a server HTTP2.0 capable. Not sure if the client's http stack does need to be updated too, does it?

OTOH the <script src='main.js' ref='assets.zip'> is a 100% client-side solution, so it would be compatible with any server of any http version. It requires a browser that implements it though, and preferably a way to feature-detect the capability, of course, so it's not perfect either.

But the ability to use synchronous require()s, á la node, in a browser would be a big big big win. imho. The ref='assets.zip', it seems to me, is an easier proposition.

-- 
( Jorge )();


More information about the es-discuss mailing list