News for hackers. Stuff that matters.
Re:WebBundles are built for content-addressable networks by spankalee on Sunday August 30, 2020 @03:36PM (#24325299)
A huge fraction of sites today are already bundled, just poorly. WebBundles solves the problem that devs are already working around with tools.

HTML, JavaScript, CSS and images are not natively bundleable. So tools like Webpack and Rollup dramatically transform the files to be able to bundle them. JavaScript is recompiled into a single file so that it's impossible to cache the individual files, and many features like dynamic import, asset fetches, and import.meta.url are partially broken.

CSS is concatenated, against breaking caching and preventing the use of individual files in separate CSS scopes.

WebBundles actually bundles the real files that would have been sent unbundled, and it works with any file/response type. WebBundles have much better compressibility than the unbundled files. So it's is both a better HTTP/2 push, and a better version of what sites are doing with tools.

And since WebBundles work with the existing request/response pipeline, the files are individually fed into the network cache (and blockers, btw), which makes it possible to build delta bundles that only include updated files. This gives you the best of both worlds of bundled and unbundled serving.

Re:WebBundles are built for content-addressable networks by yencabulator on Sunday August 30, 2020 @06:09PM (#24326359)
> JavaScript is recompiled into a single file

That world has largely moved to "chunks", where there are multiple bundles loaded on-demand, based on e.g. user navigating to a less-used part of the web app. Going to a single file as a WebBundle would be downgrade in features.

Replacing those JS transforming kludges with a reasonable file format sounds useful, though, and allows combining JS+CSS+images in a new way.

It does sound awfully lot like HTTP Push, which as far as I know is largely unused because the idea that the server knows what the client wants hasn't really proven true.

Re:WebBundles are built for content-addressable networks by spankalee on Sunday August 30, 2020 @06:36PM (#24326553)
Why would WebBundles be a downgrade? If you currently serve multiple Rollup bundles, you can instead serve multiple WebBundles.
Re:WebBundles are built for content-addressable networks by yencabulator on Monday August 31, 2020 @11:42PM (#24338328)
See what I quoted and was replying to.