It's just PUSH gone crazy?
It's just PUSH gone crazy?
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.
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.
You can read a discussion about some of the issues that it causes here - https://github.com/WICG/webpackage/issues/551 Of course, the Brave browser also have some concerns about it - https://brave.com/webbundles-harmful-to-content-blocking-sec...
Brave's assertion that "bundles are like PDF" is actually a pretty good analogy - you don't see a whole lot of ad networks popping up trying to sell ad space in PDFs, do you?
If this really did prevent ad blocking no one would expect it to ship. Inside the bundle are the same resources as without a bundle.
UAs are also completely free to request a resource from the URL rather than the bundle.
(I understand that the technology is technically neutral, but AMP is the practical reason why Google is pushing WebBundles.)
Signed Exchanges are considered harmful by Mozilla [1]
There's concern that Web Bundles are just Google's power play to be the sole gateway to the web [2]
[1] https://mozilla.github.io/standards-positions/
[2] https://twitter.com/Rich_Harris/status/1299015418913460226