News for hackers. Stuff that matters.
Re:WebBundles are built for content-addressable networks by outsomnia on Sunday August 30, 2020 @09:29AM (#24323024)
I don't really get what the advantage is for making an big atomic blob as the resource vs independently updateable pieces as h2 streams / etags / client cacheable.

It's just PUSH gone crazy?

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.
Re:WebBundles are built for content-addressable networks by aclelland on Sunday August 30, 2020 @10:39AM (#24323233)
I think one of the reason larger companies like them is because they may end ad blockers once and for all.

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

Re:WebBundles are built for content-addressable networks by notatoad on Sunday August 30, 2020 @03:39PM (#24325328)
People have been saying "AMP prevents adblockers" since the introduction of AMP, and it has never been true. Advertisers don't want to bundle their ads with the content, they can't make any money that way. they want their ads to be dynamically requested each time they are drawn so they can sell ads based on real-time conditions. A standards-based implementation of AMP won't change this.

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?

Re:WebBundles are built for content-addressable networks by rektide on Sunday August 30, 2020 @10:42AM (#24323246)
Widely disputed.

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.

Re:WebBundles are built for content-addressable networks by spankalee on Sunday August 30, 2020 @11:33AM (#24323535)
Same resources with the same URLs, access with the same request/response pipeline that's just as visible to blockers. If you can change URLs in the bundle, you can change them outside the bundle.

UAs are also completely free to request a resource from the URL rather than the bundle.

Re:WebBundles are built for content-addressable networks by untog on Sunday August 30, 2020 @02:30PM (#24324815)
I can see the advantages, for example I could send you a page as an email attachment without any problems. There’s clearly a use for it because browsers let you do (more or less) this with their own custom formats.
Re:WebBundles are built for content-addressable networks by pcwalton on Sunday August 30, 2020 @06:58PM (#24326722)
WebBundles exist so that AMP content can look like it came from the original site instead.

(I understand that the technology is technically neutral, but AMP is the practical reason why Google is pushing WebBundles.)

Re:WebBundles are built for content-addressable networks by whoopdedo on Sunday August 30, 2020 @09:47AM (#24323076)
Developers were just nostalgic for SWF, I guess.
Re:WebBundles are built for content-addressable networks by gladskdks on Monday August 31, 2020 @05:15AM (#24329681)
I know I am!
Re:WebBundles are built for content-addressable networks by dmitriid on Sunday August 30, 2020 @01:31PM (#24324326)
You have to look at where the proposal comes from. This and Signed Exchanges are Google's rebranding of AMP as "open standards".

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