[whatwg] should we add beforeload/afterload events to the web platform?

Boris Zbarsky bzbarsky at MIT.EDU
Tue Jan 17 16:29:43 PST 2012

On 1/17/12 7:24 PM, James Robinson wrote:
> Even this scheme doesn't work with a model like SPDY push or other
> bundling techniques or with more aggressive preloading that initiates
> loads before the main resource is loaded.

Er... you mean it initiates loads before it has any idea whether the 
main resource might have changed such that it no longer links to the 
objects in question?

I agree that such aggressive preloading is impossible to control from 
the source document; an interesting question is whether it's desirable. 
  I know that in the past when Gecko preloaded too aggressively we got 
huge complaints from various ad providers about "bogus impressions"....

> 1.) Monitoring/modifying/preventing network activity for a given
> resource load
> 2.) Monitoring/modifying/preventing DOM modifications that occur as the
> result of a resource load
> For (1) I can't think of any web-facing needs.

I believe mobify does in fact want (1) as much as it can to conserve 

> In any event I think that beforeload as it exists today is a bad API for
> the web

Good, we agree on that.  ;)

> (although I suspect it'll stick around for extension contexts, which is
> more acceptable in my view).

It's obviously just fine from my pov at that point.  ;)


More information about the whatwg mailing list